Skip to content

Commit

Permalink
Now that YALTAi can have multiple formats, account for this
Browse files Browse the repository at this point in the history
  • Loading branch information
PonteIneptique committed Oct 18, 2024
1 parent 64ffaca commit 62270d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rtk/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def __init__(
if not os.path.exists(yolo_model):
raise ValueError(f"Unknown YOLOv8 model `{yolo_model}`")

cmd = (f"{binary} kraken --verbose "
cmd = (f"{binary} kraken --verbose --alto "
f"{' --raise-on-error ' if kwargs.get('raise_on_error') else ''} --device {device} R "
f"segment -y {yolo_model}").split(" ")

Expand Down
3 changes: 3 additions & 0 deletions tests/test_yaltai.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ def test_yaltai(capsys):
yaltai.process()
assert len(yaltai.output_files) == 2, "Two files were processed"
assert sorted(yaltai.output_files) == ['test_output/page1.xml', 'test_output/page2.xml'], "Two files were processed"
with open('test_output/page1.xml') as f:
data = f.read()
assert "<alto" in data

0 comments on commit 62270d4

Please sign in to comment.