MikkoLipsanen commited on
Commit
7c01649
·
verified ·
1 Parent(s): 970b7b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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/202405_processor/"
17
- TROCR_MODEL_PATH = "Kansallisarkisto/multicentury-htr-model-onnx/202405_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 demo") as demo:
79
- gr.Markdown("# HTR demo")
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")