Spaces:
Starting
on
T4
Starting
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,8 @@ from onnx_text_recognition import TextRecognition
|
|
13 |
|
14 |
LINE_MODEL_PATH = "Kansallisarkisto/multicentury-textline-detection"
|
15 |
REGION_MODEL_PATH = "Kansallisarkisto/court-records-region-detection"
|
16 |
-
TROCR_PROCESSOR_PATH = "Kansallisarkisto/multicentury-htr-model-onnx
|
17 |
-
TROCR_MODEL_PATH = "Kansallisarkisto/multicentury-htr-model-onnx
|
18 |
|
19 |
|
20 |
def get_segmenter():
|
@@ -75,8 +75,8 @@ def get_text_predictions(image, segment_predictions, recognizer):
|
|
75 |
return texts
|
76 |
|
77 |
# Run demo code
|
78 |
-
with gr.Blocks(theme=gr.themes.Monochrome(), title="HTR
|
79 |
-
gr.Markdown("# HTR
|
80 |
with gr.Tab("Text content"):
|
81 |
with gr.Row():
|
82 |
input_img = gr.Image(label="Input image", type="pil")
|
|
|
13 |
|
14 |
LINE_MODEL_PATH = "Kansallisarkisto/multicentury-textline-detection"
|
15 |
REGION_MODEL_PATH = "Kansallisarkisto/court-records-region-detection"
|
16 |
+
TROCR_PROCESSOR_PATH = "Kansallisarkisto/multicentury-htr-model-onnx"
|
17 |
+
TROCR_MODEL_PATH = "Kansallisarkisto/multicentury-htr-model-onnx"
|
18 |
|
19 |
|
20 |
def get_segmenter():
|
|
|
75 |
return texts
|
76 |
|
77 |
# Run demo code
|
78 |
+
with gr.Blocks(theme=gr.themes.Monochrome(), title="Multicentury HTR Demo") as demo:
|
79 |
+
gr.Markdown("# Multicentury HTR Demo")
|
80 |
with gr.Tab("Text content"):
|
81 |
with gr.Row():
|
82 |
input_img = gr.Image(label="Input image", type="pil")
|