Spaces:
Running
on
Zero
Running
on
Zero
viklofg
commited on
Commit
·
3521300
1
Parent(s):
cb30282
Formatting
Browse files- app/tabs/submit.py +29 -36
app/tabs/submit.py
CHANGED
@@ -179,19 +179,16 @@ def get_image_from_image_url(input_value):
|
|
179 |
|
180 |
|
181 |
with gr.Blocks() as submit:
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
)
|
189 |
|
190 |
collection_submit_state = gr.State()
|
191 |
with gr.Group():
|
192 |
-
with gr.Row(
|
193 |
-
equal_height=True,
|
194 |
-
):
|
195 |
with gr.Column(scale=2):
|
196 |
batch_image_gallery = gr.Gallery(
|
197 |
file_types=["image"],
|
@@ -211,7 +208,6 @@ with gr.Blocks() as submit:
|
|
211 |
height="100%",
|
212 |
columns=4,
|
213 |
)
|
214 |
-
# with Modal(visible=False) as edit_pipeline_modal:
|
215 |
|
216 |
image_iiif_url = gr.Textbox(
|
217 |
label="Upload by image ID",
|
@@ -255,31 +251,28 @@ with gr.Blocks() as submit:
|
|
255 |
padding=False,
|
256 |
)
|
257 |
|
258 |
-
with Modal(
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
padding=False,
|
281 |
-
elem_classes="pipeline-help",
|
282 |
-
)
|
283 |
|
284 |
with gr.Row():
|
285 |
run_button = gr.Button("Transcribe", variant="primary", scale=0, min_width=200)
|
|
|
179 |
|
180 |
|
181 |
with gr.Blocks() as submit:
|
182 |
+
|
183 |
+
gr.Markdown("# Upload")
|
184 |
+
gr.Markdown(
|
185 |
+
"Select or upload the image you want to transcribe. You can upload up to five images at a time. \n "
|
186 |
+
"Alternatively, you can choose from example images from the gallery or use Image_IDs."
|
187 |
+
)
|
|
|
188 |
|
189 |
collection_submit_state = gr.State()
|
190 |
with gr.Group():
|
191 |
+
with gr.Row(equal_height=True):
|
|
|
|
|
192 |
with gr.Column(scale=2):
|
193 |
batch_image_gallery = gr.Gallery(
|
194 |
file_types=["image"],
|
|
|
208 |
height="100%",
|
209 |
columns=4,
|
210 |
)
|
|
|
211 |
|
212 |
image_iiif_url = gr.Textbox(
|
213 |
label="Upload by image ID",
|
|
|
251 |
padding=False,
|
252 |
)
|
253 |
|
254 |
+
with Modal(visible=False) as edit_pipeline_modal:
|
255 |
+
gr.Markdown(
|
256 |
+
"""
|
257 |
+
## Edit Pipeline
|
258 |
+
The code snippet below is a YAML file that the HTRflow app uses to process the image. If you have chosen an
|
259 |
+
image from the "Examples" section, the YAML is already a pre-made template tailored to fit the example image.
|
260 |
+
|
261 |
+
Edit pipeline if needed:
|
262 |
+
"""
|
263 |
+
)
|
264 |
+
custom_template_yaml = gr.Code(
|
265 |
+
value=get_yaml,
|
266 |
+
inputs=pipeline_dropdown,
|
267 |
+
language="yaml",
|
268 |
+
container=False,
|
269 |
+
)
|
270 |
+
url = "https://ai-riksarkivet.github.io/htrflow/latest/getting_started/pipeline.html#example-pipelines"
|
271 |
+
gr.HTML(
|
272 |
+
f'See the <a href="{url}">documentation</a> for a detailed description on how to customize HTRflow pipelines.',
|
273 |
+
padding=False,
|
274 |
+
elem_classes="pipeline-help",
|
275 |
+
)
|
|
|
|
|
|
|
276 |
|
277 |
with gr.Row():
|
278 |
run_button = gr.Button("Transcribe", variant="primary", scale=0, min_width=200)
|