Spaces:
Running
Running
Update demo.py
Browse files
demo.py
CHANGED
|
@@ -145,19 +145,19 @@ with gr.Blocks() as demo:
|
|
| 145 |
```
|
| 146 |
"""
|
| 147 |
)
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
|
| 162 |
face_recog_button.click(compare_face, inputs=[image_input1, image_input2], outputs=recog_html_output)
|
| 163 |
gr.HTML('<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fkby-ai%2FFaceRecognition"><img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fkby-ai%2FFaceRecognition&countColor=%23263759" /></a>')
|
|
|
|
| 145 |
```
|
| 146 |
"""
|
| 147 |
)
|
| 148 |
+
with gr.Column(scale=7):
|
| 149 |
+
with gr.Row():
|
| 150 |
+
with gr.Column():
|
| 151 |
+
image_input1 = gr.Image(type='filepath')
|
| 152 |
+
gr.Examples(['face_examples/1.jpg', 'face_examples/3.jpg', 'face_examples/5.jpg', 'face_examples/7.jpg', 'face_examples/9.jpg'],
|
| 153 |
+
inputs=image_input1)
|
| 154 |
+
with gr.Column():
|
| 155 |
+
image_input2 = gr.Image(type='filepath')
|
| 156 |
+
gr.Examples(['face_examples/2.jpg', 'face_examples/4.jpg', 'face_examples/6.jpg', 'face_examples/8.jpg', 'face_examples/10.jpg'],
|
| 157 |
+
inputs=image_input2)
|
| 158 |
+
face_recog_button = gr.Button("Compare Face", variant="primary", size="lg")
|
| 159 |
+
with gr.Column(scale=3):
|
| 160 |
+
recog_html_output = gr.HTML()
|
| 161 |
|
| 162 |
face_recog_button.click(compare_face, inputs=[image_input1, image_input2], outputs=recog_html_output)
|
| 163 |
gr.HTML('<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fkby-ai%2FFaceRecognition"><img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fkby-ai%2FFaceRecognition&countColor=%23263759" /></a>')
|