Update demo.py
Browse files
demo.py
CHANGED
|
@@ -171,7 +171,7 @@ with gr.Blocks() as demo:
|
|
| 171 |
image_result_output = gr.HTML()
|
| 172 |
|
| 173 |
id_examples.outputs = [id_result_output, image_result_output]
|
| 174 |
-
id_recognition_button.click(idcard_recognition, inputs=[id_image_input1, id_image_input2], outputs=[id_result_output, image_result_output])
|
| 175 |
with gr.TabItem("Barcode Recognition"):
|
| 176 |
with gr.Row():
|
| 177 |
with gr.Column(scale=3):
|
|
@@ -183,7 +183,7 @@ with gr.Blocks() as demo:
|
|
| 183 |
with gr.Column(scale=2):
|
| 184 |
image_result_output = gr.HTML()
|
| 185 |
|
| 186 |
-
barcode_recognition_button.click(barcode_recognition, inputs=barcode_image_input, outputs=[barcode_result_output, image_result_output])
|
| 187 |
|
| 188 |
with gr.TabItem("Credit Card Recognition"):
|
| 189 |
with gr.Row():
|
|
@@ -204,8 +204,8 @@ with gr.Blocks() as demo:
|
|
| 204 |
image_result_output = gr.HTML()
|
| 205 |
|
| 206 |
credit_examples.outputs = [credit_result_output, image_result_output]
|
| 207 |
-
credit_recognition_button.click(credit_recognition, inputs=credit_image_input, outputs=[credit_result_output, image_result_output])
|
| 208 |
|
| 209 |
gr.HTML('<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2FFaceOnLive%2FID-Document-Recognition-SDK"><img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2FFaceOnLive%2FID-Document-Recognition-SDK&labelColor=%23ff8a65&countColor=%2337d67a&style=flat&labelStyle=upper" /></a>')
|
| 210 |
|
| 211 |
-
demo.launch(server_name="0.0.0.0", server_port=7860, show_api=False)
|
|
|
|
| 171 |
image_result_output = gr.HTML()
|
| 172 |
|
| 173 |
id_examples.outputs = [id_result_output, image_result_output]
|
| 174 |
+
id_recognition_button.click(idcard_recognition, inputs=[id_image_input1, id_image_input2], outputs=[id_result_output, image_result_output], api_name=False)
|
| 175 |
with gr.TabItem("Barcode Recognition"):
|
| 176 |
with gr.Row():
|
| 177 |
with gr.Column(scale=3):
|
|
|
|
| 183 |
with gr.Column(scale=2):
|
| 184 |
image_result_output = gr.HTML()
|
| 185 |
|
| 186 |
+
barcode_recognition_button.click(barcode_recognition, inputs=barcode_image_input, outputs=[barcode_result_output, image_result_output], api_name=False)
|
| 187 |
|
| 188 |
with gr.TabItem("Credit Card Recognition"):
|
| 189 |
with gr.Row():
|
|
|
|
| 204 |
image_result_output = gr.HTML()
|
| 205 |
|
| 206 |
credit_examples.outputs = [credit_result_output, image_result_output]
|
| 207 |
+
credit_recognition_button.click(credit_recognition, inputs=credit_image_input, outputs=[credit_result_output, image_result_output], api_name=False)
|
| 208 |
|
| 209 |
gr.HTML('<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2FFaceOnLive%2FID-Document-Recognition-SDK"><img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2FFaceOnLive%2FID-Document-Recognition-SDK&labelColor=%23ff8a65&countColor=%2337d67a&style=flat&labelStyle=upper" /></a>')
|
| 210 |
|
| 211 |
+
demo.queue(api_open=False).launch(server_name="0.0.0.0", server_port=7860, show_api=False)
|