Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -108,16 +108,18 @@ with gr.Blocks() as demo:
|
|
108 |
|
109 |
gr.Examples(
|
110 |
examples=[
|
111 |
-
["assets/coco.jpg", "plain texts OCR", "", ""],
|
112 |
-
["assets/en2.png", "plain texts OCR", "", ""],
|
113 |
-
["assets/eq.jpg", "format texts OCR", "", ""],
|
114 |
-
["assets/table.jpg", "format texts OCR", "", ""],
|
115 |
-
["assets/aff2.png", "plain fine-grained OCR", "[409,763,756,891]"
|
|
|
116 |
],
|
117 |
-
inputs=[image_input, task_dropdown],
|
|
|
118 |
label="examples",
|
119 |
)
|
120 |
-
|
121 |
task_dropdown.change(
|
122 |
task_update,
|
123 |
inputs=[task_dropdown],
|
|
|
108 |
|
109 |
gr.Examples(
|
110 |
examples=[
|
111 |
+
["assets/coco.jpg", "plain texts OCR", "", "", ""],
|
112 |
+
["assets/en2.png", "plain texts OCR", "", "", ""],
|
113 |
+
["assets/eq.jpg", "format texts OCR", "", "", ""],
|
114 |
+
["assets/table.jpg", "format texts OCR", "", "", ""],
|
115 |
+
["assets/aff2.png", "plain fine-grained OCR", "box", "", "[409,763,756,891]"],
|
116 |
+
["assets/color.png", "plain fine-grained OCR", "color", "red", ""],
|
117 |
],
|
118 |
+
inputs=[image_input, task_dropdown, fine_grained_dropdown, color_dropdown, box_input],
|
119 |
+
outputs=[ocr_result, html_result],
|
120 |
label="examples",
|
121 |
)
|
122 |
+
|
123 |
task_dropdown.change(
|
124 |
task_update,
|
125 |
inputs=[task_dropdown],
|