prithivMLmods commited on
Commit
af7b48b
·
verified ·
1 Parent(s): 2e16d03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -390,9 +390,9 @@ def create_gradio_interface():
390
  )
391
  image_preview = gr.Image(label="Preview", type="pil", interactive=False, height=300)
392
  with gr.Row():
393
- prev_page_btn = gr.Button(" Previous", size="md")
394
  page_info = gr.HTML('<div class="page-info">No file loaded</div>')
395
- next_page_btn = gr.Button("Next ", size="md")
396
  model_choice = gr.Radio(
397
  choices=["dots.ocr", "Dolphin"],
398
  label="Select Model",
@@ -402,15 +402,15 @@ def create_gradio_interface():
402
  max_new_tokens = gr.Slider(minimum=1000, maximum=32000, value=24000, step=1000, label="Max New Tokens")
403
  min_pixels = gr.Number(value=MIN_PIXELS, label="Min Pixels")
404
  max_pixels = gr.Number(value=MAX_PIXELS, label="Max Pixels")
405
- process_btn = gr.Button("🚀 Process Document", variant="primary", elem_classes=["process-button"], size="lg")
406
- clear_btn = gr.Button("🗑️ Clear All", variant="secondary")
407
  with gr.Column(scale=2):
408
  with gr.Tabs():
409
- with gr.Tab("🖼️ Processed Image"):
410
  processed_image = gr.Image(label="Image with Layout Detection", type="pil", interactive=False, height=500)
411
- with gr.Tab("📝 Extracted Content"):
412
  markdown_output = gr.Markdown(value="Click 'Process Document' to see extracted content...", height=500)
413
- with gr.Tab("📋 Layout JSON"):
414
  json_output = gr.JSON(label="Layout Analysis Results", value=None)
415
 
416
  def handle_file_upload(file_path):
 
390
  )
391
  image_preview = gr.Image(label="Preview", type="pil", interactive=False, height=300)
392
  with gr.Row():
393
+ prev_page_btn = gr.Button(" Previous", size="md")
394
  page_info = gr.HTML('<div class="page-info">No file loaded</div>')
395
+ next_page_btn = gr.Button("Next ", size="md")
396
  model_choice = gr.Radio(
397
  choices=["dots.ocr", "Dolphin"],
398
  label="Select Model",
 
402
  max_new_tokens = gr.Slider(minimum=1000, maximum=32000, value=24000, step=1000, label="Max New Tokens")
403
  min_pixels = gr.Number(value=MIN_PIXELS, label="Min Pixels")
404
  max_pixels = gr.Number(value=MAX_PIXELS, label="Max Pixels")
405
+ process_btn = gr.Button("🥠 Process Document", variant="primary", elem_classes=["process-button"], size="lg")
406
+ clear_btn = gr.Button("🧽 Clear Document", variant="secondary")
407
  with gr.Column(scale=2):
408
  with gr.Tabs():
409
+ with gr.Tab("✦︎ Processed Image"):
410
  processed_image = gr.Image(label="Image with Layout Detection", type="pil", interactive=False, height=500)
411
+ with gr.Tab("🀥 Extracted Content"):
412
  markdown_output = gr.Markdown(value="Click 'Process Document' to see extracted content...", height=500)
413
+ with gr.Tab(" Layout JSON"):
414
  json_output = gr.JSON(label="Layout Analysis Results", value=None)
415
 
416
  def handle_file_upload(file_path):