Felix92 commited on
Commit
93312f4
·
verified ·
1 Parent(s): f12908d

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +6 -6
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🔥
4
  colorFrom: red
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 4.44.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
4
  colorFrom: red
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 5.3.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
app.py CHANGED
@@ -240,7 +240,7 @@ with gr.Blocks(fill_height=True) as demo:
240
  )
241
  with gr.Row():
242
  with gr.Column(scale=1):
243
- upload = gr.File(label="Upload File [JPG | PNG | PDF]", file_types=["pdf", "jpg", "png"])
244
  page_selection = gr.Slider(minimum=1, maximum=10, step=1, value=1, label="Page selection")
245
  det_model = gr.Dropdown(choices=DET_ARCHS, value=DET_ARCHS[0], label="Text detection model")
246
  reco_model = gr.Dropdown(
@@ -260,14 +260,14 @@ with gr.Blocks(fill_height=True) as demo:
260
  analyze_button = gr.Button("Analyze page")
261
  with gr.Column(scale=3):
262
  with gr.Row():
263
- input_image = gr.Image(label="Input page", width=600)
264
- segmentation_heatmap = gr.Image(label="Segmentation heatmap", width=600)
265
- output_image = gr.Image(label="Output page", width=600)
266
  with gr.Row():
267
  with gr.Column(scale=3):
268
- ocr_output = gr.JSON(label="OCR output", render=True, scale=1)
269
  with gr.Column(scale=3):
270
- synthesized_page = gr.Image(label="Synthesized page", width=600)
271
 
272
  analyze_button.click(
273
  analyze_page,
 
240
  )
241
  with gr.Row():
242
  with gr.Column(scale=1):
243
+ upload = gr.File(label="Upload File [JPG | PNG | PDF]", file_types=[".pdf", ".jpg", ".png"])
244
  page_selection = gr.Slider(minimum=1, maximum=10, step=1, value=1, label="Page selection")
245
  det_model = gr.Dropdown(choices=DET_ARCHS, value=DET_ARCHS[0], label="Text detection model")
246
  reco_model = gr.Dropdown(
 
260
  analyze_button = gr.Button("Analyze page")
261
  with gr.Column(scale=3):
262
  with gr.Row():
263
+ input_image = gr.Image(label="Input page", width=700, height=500)
264
+ segmentation_heatmap = gr.Image(label="Segmentation heatmap", width=700, height=500)
265
+ output_image = gr.Image(label="Output page", width=700, height=500)
266
  with gr.Row():
267
  with gr.Column(scale=3):
268
+ ocr_output = gr.JSON(label="OCR output", render=True, scale=1, height=500)
269
  with gr.Column(scale=3):
270
+ synthesized_page = gr.Image(label="Synthesized page", width=700, height=500)
271
 
272
  analyze_button.click(
273
  analyze_page,