Spaces:
Runtime error
Runtime error
Update
Browse files
demo.py
CHANGED
@@ -156,6 +156,14 @@ with gr.Blocks() as demo:
|
|
156 |
id_image_input1 = gr.Image(type='filepath', label='Front')
|
157 |
id_image_input2 = gr.Image(type='filepath', label='Back')
|
158 |
id_recognition_button = gr.Button("ID Card Recognition")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
with gr.Column(scale=5):
|
160 |
id_result_output = gr.JSON()
|
161 |
|
@@ -163,13 +171,6 @@ with gr.Blocks() as demo:
|
|
163 |
image_result_output = gr.HTML()
|
164 |
|
165 |
id_recognition_button.click(idcard_recognition, inputs=[id_image_input1, id_image_input2], outputs=[id_result_output, image_result_output])
|
166 |
-
gr.Markdown("## Image Examples")
|
167 |
-
gr.Examples(
|
168 |
-
examples=[['examples/11.jpg', 'examples/12.jpg'], ['examples/21.jpg', 'examples/22.jpg'], ['examples/3.jpg', None]],
|
169 |
-
inputs=[id_image_input1, id_image_input2],
|
170 |
-
outputs=[id_result_output, image_result_output],
|
171 |
-
fn=idcard_recognition
|
172 |
-
)
|
173 |
with gr.TabItem("Barcode Recognition"):
|
174 |
with gr.Row():
|
175 |
with gr.Column(scale=3):
|
|
|
156 |
id_image_input1 = gr.Image(type='filepath', label='Front')
|
157 |
id_image_input2 = gr.Image(type='filepath', label='Back')
|
158 |
id_recognition_button = gr.Button("ID Card Recognition")
|
159 |
+
gr.Markdown("## Image Examples")
|
160 |
+
gr.Examples(
|
161 |
+
examples=[['examples/11.jpg', 'examples/12.jpg'], ['examples/21.jpg', 'examples/22.jpg'], ['examples/3.jpg', '']],
|
162 |
+
inputs=[id_image_input1, id_image_input2],
|
163 |
+
outputs=[id_result_output, image_result_output],
|
164 |
+
fn=idcard_recognition
|
165 |
+
)
|
166 |
+
|
167 |
with gr.Column(scale=5):
|
168 |
id_result_output = gr.JSON()
|
169 |
|
|
|
171 |
image_result_output = gr.HTML()
|
172 |
|
173 |
id_recognition_button.click(idcard_recognition, inputs=[id_image_input1, id_image_input2], outputs=[id_result_output, image_result_output])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
with gr.TabItem("Barcode Recognition"):
|
175 |
with gr.Row():
|
176 |
with gr.Column(scale=3):
|