Update app.py
Browse files
app.py
CHANGED
|
@@ -547,34 +547,6 @@ Runtime device: **{DEVICE}**
|
|
| 547 |
with gr.Tab("Raw Text", id="tab_raw"):
|
| 548 |
raw_out = gr.Textbox(lines=20, show_copy_button=True, show_label=False)
|
| 549 |
|
| 550 |
-
# Better examples: populate File input (works for both image/pdf paths inside repo)
|
| 551 |
-
gr.Examples(
|
| 552 |
-
examples=[
|
| 553 |
-
["examples/ocr.jpg", "Gundam", "π Markdown", "", 1],
|
| 554 |
-
["examples/reachy-mini.jpg", "Gundam", "π Locate", "Robot", 1],
|
| 555 |
-
],
|
| 556 |
-
inputs=[file_in, mode, task, prompt, page_selector],
|
| 557 |
-
cache_examples=False,
|
| 558 |
-
)
|
| 559 |
-
|
| 560 |
-
with gr.Accordion("βΉοΈ Info", open=False):
|
| 561 |
-
gr.Markdown(
|
| 562 |
-
"""
|
| 563 |
-
### Modes
|
| 564 |
-
- **Gundam**: 1024 base + 640 tiles with cropping - Best balance
|
| 565 |
-
- **Tiny**: 512Γ512, no crop - Fastest
|
| 566 |
-
- **Small**: 640Γ640, no crop - Quick
|
| 567 |
-
- **Base**: 1024Γ1024, no crop - Standard
|
| 568 |
-
- **Large**: 1280Γ1280, no crop - Highest quality
|
| 569 |
-
|
| 570 |
-
### Tasks
|
| 571 |
-
- **π Markdown**: DeepSeek-OCR β structured markdown (grounding β
)
|
| 572 |
-
- **π Free OCR**: TrOCR β fast text-only OCR
|
| 573 |
-
- **π Locate**: DeepSeek-OCR β bounding boxes (grounding β
)
|
| 574 |
-
- **π Describe**: BLIP β short image description
|
| 575 |
-
- **βοΈ Custom**: DeepSeek-OCR prompt (add `<|grounding|>` for boxes)
|
| 576 |
-
"""
|
| 577 |
-
)
|
| 578 |
|
| 579 |
# File / PDF page handling
|
| 580 |
file_in.change(load_image, [file_in, page_selector], [input_img])
|
|
|
|
| 547 |
with gr.Tab("Raw Text", id="tab_raw"):
|
| 548 |
raw_out = gr.Textbox(lines=20, show_copy_button=True, show_label=False)
|
| 549 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 550 |
|
| 551 |
# File / PDF page handling
|
| 552 |
file_in.change(load_image, [file_in, page_selector], [input_img])
|