prithivMLmods commited on
Commit
40dbff3
·
verified ·
1 Parent(s): c0297ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -9
app.py CHANGED
@@ -302,13 +302,18 @@ def create_gradio_interface():
302
 
303
  with gr.Column(scale=2):
304
  #gr.Markdown("### 2. View Output")
305
- output_stream = gr.Textbox(label="Model Output", interactive=False, lines=20, show_copy_button=True)
306
-
 
 
 
 
 
307
  gr.Examples(
308
  examples=[
309
- ["examples/1.png", "Transcribe this receipt."],
310
- ["examples/2.png", "Extract the table from this document as markdown."],
311
- ["examples/3.png", "What information is presented in this infographic?"],
312
  ],
313
  inputs=[image_input_doc, prompt_input_doc]
314
  )
@@ -338,10 +343,10 @@ def create_gradio_interface():
338
 
339
  gr.Examples(
340
  examples=[
341
- ["https://huggingface.co/datasets/merve/vlm_test_images/resolve/main/candy.JPG", "Object Detection", "candy", 5],
342
- ["https://huggingface.co/datasets/merve/vlm_test_images/resolve/main/candy.JPG", "Point Detection", "candy", 5],
343
- ["https://moondream.ai/images/blog/moondream-3-preview/benchmarks.jpg", "Caption", "", 5],
344
- ["https://moondream.ai/images/blog/moondream-3-preview/benchmarks.jpg", "Visual Question Answering", "how well does moondream 3 perform in chartvqa?", 5],
345
  ],
346
  inputs=[md3_image_input, md3_task_type, md3_prompt_input, md3_max_objects],
347
  label="Click an example to populate inputs"
 
302
 
303
  with gr.Column(scale=2):
304
  #gr.Markdown("### 2. View Output")
305
+ with gr.Tab("Output Stream"):
306
+ output_stream = gr.Textbox(label="Model Output", interactive=False, lines=24, show_copy_button=True)
307
+
308
+ with gr.Tab("README.md"):
309
+ with gr.Accordion("(Result.md)", open=True):
310
+ markdown_output = gr.Markdown()
311
+
312
  gr.Examples(
313
  examples=[
314
+ ["examples/1.jpg", "Transcribe this receipt."],
315
+ ["examples/2.jpg", "Extract the content."],
316
+ ["examples/3.jpg", "OCR the image."],
317
  ],
318
  inputs=[image_input_doc, prompt_input_doc]
319
  )
 
343
 
344
  gr.Examples(
345
  examples=[
346
+ ["mds3/1.jpg", "Object Detection", "boats", 7],
347
+ ["md3/2.jpg", "Point Detection", "candy", 7],
348
+ ["md3/3.png", "Caption", "", 5],
349
+ ["md3/4.jpg", "Visual Question Answering", "Analyze the GDP trend over the yearsAnalyze the GDP trend over the years.", 5],
350
  ],
351
  inputs=[md3_image_input, md3_task_type, md3_prompt_input, md3_max_objects],
352
  label="Click an example to populate inputs"