Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -15,10 +15,10 @@ from onnx_text_recognition import TextRecognition
|
|
15 |
|
16 |
LINE_MODEL_PATH = "Kansallisarkisto/multicentury-textline-detection"
|
17 |
REGION_MODEL_PATH = "Kansallisarkisto/court-records-region-detection"
|
18 |
-
TROCR_PROCESSOR_PATH = "Kansallisarkisto/multicentury-htr-model-onnx"
|
19 |
-
TROCR_MODEL_PATH = "Kansallisarkisto/multicentury-htr-model-onnx"
|
20 |
|
21 |
-
login(token=os.getenv("HF_TOKEN"))
|
22 |
|
23 |
def get_segmenter():
|
24 |
"""Initialize segmentation class."""
|
|
|
15 |
|
16 |
LINE_MODEL_PATH = "Kansallisarkisto/multicentury-textline-detection"
|
17 |
REGION_MODEL_PATH = "Kansallisarkisto/court-records-region-detection"
|
18 |
+
TROCR_PROCESSOR_PATH = "Kansallisarkisto/multicentury-htr-model-onnx/202405_processor"
|
19 |
+
TROCR_MODEL_PATH = "Kansallisarkisto/multicentury-htr-model-onnx/202405_onnx"
|
20 |
|
21 |
+
login(token=os.getenv("HF_TOKEN"), add_to_git_credential=True)
|
22 |
|
23 |
def get_segmenter():
|
24 |
"""Initialize segmentation class."""
|