Spaces:
Running
on
Zero
Running
on
Zero
add example
Browse files- .gitattributes +1 -0
- app.py +18 -2
- assets/Programme_Officiel.png +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -122,8 +122,10 @@ with gr.Blocks() as demo:
|
|
122 |
label="Parsed screen elements", placeholder="Text Output"
|
123 |
)
|
124 |
|
125 |
-
|
126 |
-
|
|
|
|
|
127 |
inputs=[
|
128 |
image_input_component,
|
129 |
box_threshold_component,
|
@@ -132,8 +134,22 @@ with gr.Blocks() as demo:
|
|
132 |
imgsz_component,
|
133 |
],
|
134 |
outputs=[image_output_component, text_output_component],
|
|
|
|
|
135 |
)
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
# demo.launch(debug=False, show_error=True, share=True)
|
138 |
# demo.launch(share=True, server_port=7861, server_name='0.0.0.0')
|
139 |
demo.queue().launch(share=False)
|
|
|
122 |
label="Parsed screen elements", placeholder="Text Output"
|
123 |
)
|
124 |
|
125 |
+
gr.Examples(
|
126 |
+
examples=[
|
127 |
+
["assets/Programme_Officiel.png", 0.05, 0.1, True, 640],
|
128 |
+
],
|
129 |
inputs=[
|
130 |
image_input_component,
|
131 |
box_threshold_component,
|
|
|
134 |
imgsz_component,
|
135 |
],
|
136 |
outputs=[image_output_component, text_output_component],
|
137 |
+
fn=process,
|
138 |
+
cache_examples=True,
|
139 |
)
|
140 |
|
141 |
+
submit_button_component.click(
|
142 |
+
fn=process,
|
143 |
+
inputs=[
|
144 |
+
image_input_component,
|
145 |
+
box_threshold_component,
|
146 |
+
iou_threshold_component,
|
147 |
+
use_paddleocr_component,
|
148 |
+
imgsz_component,
|
149 |
+
],
|
150 |
+
outputs=[image_output_component, text_output_component],
|
151 |
+
)
|
152 |
+
|
153 |
# demo.launch(debug=False, show_error=True, share=True)
|
154 |
# demo.launch(share=True, server_port=7861, server_name='0.0.0.0')
|
155 |
demo.queue().launch(share=False)
|
assets/Programme_Officiel.png
ADDED
![]() |
Git LFS Details
|