mirror of
https://github.com/mikegerber/ocrd_calamari.git
synced 2025-06-08 19:29:53 +02:00
🎨 Refactor model path constant into a variable
This commit is contained in:
parent
d8db405a4c
commit
f20eb3ba45
1 changed files with 2 additions and 3 deletions
|
@ -10,6 +10,7 @@ from ocrd_calamari import CalamariRecognize
|
||||||
from .base import assets
|
from .base import assets
|
||||||
|
|
||||||
METS_KANT = assets.url_of('kant_aufklaerung_1784-page-block-line-word_glyph/data/mets.xml')
|
METS_KANT = assets.url_of('kant_aufklaerung_1784-page-block-line-word_glyph/data/mets.xml')
|
||||||
|
CHECKPOINT = os.path.join(os.getcwd(), 'gt4histocr-calamari/*.ckpt.json')
|
||||||
WORKSPACE_DIR = '/tmp/test-ocrd-calamari'
|
WORKSPACE_DIR = '/tmp/test-ocrd-calamari'
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,9 +53,7 @@ def test_recognize(workspace):
|
||||||
workspace,
|
workspace,
|
||||||
input_file_grp="OCR-D-GT-SEG-LINE",
|
input_file_grp="OCR-D-GT-SEG-LINE",
|
||||||
output_file_grp="OCR-D-OCR-CALAMARI",
|
output_file_grp="OCR-D-OCR-CALAMARI",
|
||||||
parameter={
|
parameter={'checkpoint': CHECKPOINT}
|
||||||
'checkpoint': os.path.join(os.getcwd(), 'gt4histocr-calamari/*.ckpt.json')
|
|
||||||
}
|
|
||||||
).process()
|
).process()
|
||||||
workspace.save_mets()
|
workspace.save_mets()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue