Spaces:
Sleeping
Sleeping
Update app/main.py
Browse files- app/main.py +5 -3
app/main.py
CHANGED
@@ -66,6 +66,11 @@ with gr.Blocks(title="HTRflow", theme=theme, css=css) as demo:
|
|
66 |
if os.path.exists(tmp_dir) and os.path.isdir(tmp_dir):
|
67 |
shutil.rmtree(tmp_dir)
|
68 |
|
|
|
|
|
|
|
|
|
|
|
69 |
@demo.load(
|
70 |
inputs=[template_output_yaml_code],
|
71 |
outputs=[template_output_yaml_code],
|
@@ -73,9 +78,6 @@ with gr.Blocks(title="HTRflow", theme=theme, css=css) as demo:
|
|
73 |
def inital_yaml_code(template_output_yaml_code):
|
74 |
return template_output_yaml_code
|
75 |
|
76 |
-
@demo.load()
|
77 |
-
def inital_trocr_load():
|
78 |
-
return TrOCR("Riksarkivet/trocr-base-handwritten-hist-swe-2")
|
79 |
|
80 |
def sync_gradio_objects(input_value, state_value):
|
81 |
"""Synchronize the YAML state if there is a mismatch."""
|
|
|
66 |
if os.path.exists(tmp_dir) and os.path.isdir(tmp_dir):
|
67 |
shutil.rmtree(tmp_dir)
|
68 |
|
69 |
+
|
70 |
+
@demo.load()
|
71 |
+
def inital_trocr_load():
|
72 |
+
TrOCR("Riksarkivet/trocr-base-handwritten-hist-swe-2")
|
73 |
+
|
74 |
@demo.load(
|
75 |
inputs=[template_output_yaml_code],
|
76 |
outputs=[template_output_yaml_code],
|
|
|
78 |
def inital_yaml_code(template_output_yaml_code):
|
79 |
return template_output_yaml_code
|
80 |
|
|
|
|
|
|
|
81 |
|
82 |
def sync_gradio_objects(input_value, state_value):
|
83 |
"""Synchronize the YAML state if there is a mismatch."""
|