Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,16 +8,27 @@ import crVps
|
|
| 8 |
def clear_all(image1, image2, output_image, output_json):
|
| 9 |
return None, None, None, None
|
| 10 |
|
| 11 |
-
with gr.Blocks(
|
| 12 |
-
.
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
gr.Markdown("Choose or upload a dog image and press cpmpare!! the system will retutn the 2 detected faces with the recognition result")
|
| 16 |
-
with gr.Row():
|
| 17 |
-
with gr.Column():
|
| 18 |
image1_input = gr.Image(type="pil", label="Image 1",width=200,height=200)
|
| 19 |
examples_image1 = gr.Examples(examples=["./dob1.jpg", "./p1.jpg", "./dob3.jpg", "./d1.jpg"], inputs=image1_input)
|
| 20 |
-
with gr.Column():
|
| 21 |
image2_input = gr.Image(type="pil", label="Image 2",width=200,height=200)
|
| 22 |
examples_image2 = gr.Examples(examples=["./dob2.jpg", "./p2.jpg", "./dob4.jpg", "./d2.jpg"], inputs=image2_input)
|
| 23 |
threshold_input = gr.Slider(minimum=0.0, maximum=1.0, value=0.55, step=0.05, label="Threshold")
|
|
|
|
| 8 |
def clear_all(image1, image2, output_image, output_json):
|
| 9 |
return None, None, None, None
|
| 10 |
|
| 11 |
+
with gr.Blocks() as demo:
|
| 12 |
+
demo.style(
|
| 13 |
+
css="""
|
| 14 |
+
.gradio-container {
|
| 15 |
+
max-width: 1200px !important;
|
| 16 |
+
margin-left: auto !important;
|
| 17 |
+
margin-right: auto !important;
|
| 18 |
+
}
|
| 19 |
+
.contain {
|
| 20 |
+
display: flex !important;
|
| 21 |
+
flex-direction: row !important;
|
| 22 |
+
flex-wrap: nowrap !important;
|
| 23 |
+
}
|
| 24 |
+
"""
|
| 25 |
+
)
|
| 26 |
gr.Markdown("Choose or upload a dog image and press cpmpare!! the system will retutn the 2 detected faces with the recognition result")
|
| 27 |
+
with gr.Row(equal_height=True, scale=2):
|
| 28 |
+
with gr.Column(scale=1, min_width=200):
|
| 29 |
image1_input = gr.Image(type="pil", label="Image 1",width=200,height=200)
|
| 30 |
examples_image1 = gr.Examples(examples=["./dob1.jpg", "./p1.jpg", "./dob3.jpg", "./d1.jpg"], inputs=image1_input)
|
| 31 |
+
with gr.Column(scale=1, min_width=200):
|
| 32 |
image2_input = gr.Image(type="pil", label="Image 2",width=200,height=200)
|
| 33 |
examples_image2 = gr.Examples(examples=["./dob2.jpg", "./p2.jpg", "./dob4.jpg", "./d2.jpg"], inputs=image2_input)
|
| 34 |
threshold_input = gr.Slider(minimum=0.0, maximum=1.0, value=0.55, step=0.05, label="Threshold")
|