viklofg commited on
Commit
3521300
·
1 Parent(s): cb30282

Formatting

Browse files
Files changed (1) hide show
  1. 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
- with gr.Row():
183
- with gr.Column():
184
- gr.Markdown("# Upload")
185
- gr.Markdown(
186
- "Select or upload the image you want to transcribe. You can upload up to five images at a time. \n "
187
- "Alternatively, you can choose from example images from the gallery or use Image_IDs."
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
- visible=False,
260
- ) as edit_pipeline_modal:
261
- with gr.Column():
262
- gr.Markdown(
263
- """
264
- ## Edit Pipeline
265
- The code snippet below is a YAML file that the HTRflow app uses to process the image. If you have chosen an
266
- image from the "Examples" section, the YAML is already a pre-made template tailored to fit the example image.
267
-
268
- Edit pipeline if needed:
269
- """
270
- )
271
- custom_template_yaml = gr.Code(
272
- value=get_yaml,
273
- inputs=pipeline_dropdown,
274
- language="yaml",
275
- container=False,
276
- )
277
- url = "https://ai-riksarkivet.github.io/htrflow/latest/getting_started/pipeline.html#example-pipelines"
278
- gr.HTML(
279
- f'See the <a href="{url}">documentation</a> for a detailed description on how to customize HTRflow pipelines.',
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)