Commit
·
830a4c2
1
Parent(s):
95dab95
upload examples
Browse files- app.py +12 -1
- examples/.DS_Store +0 -0
- examples/barboon.jpeg +0 -0
- examples/yong1.png +0 -0
- examples/yong2.png +0 -0
app.py
CHANGED
@@ -54,7 +54,7 @@ def calculate_similarity(img1, img2):
|
|
54 |
|
55 |
# Create Gradio interface with custom layout
|
56 |
with gr.Blocks() as iface:
|
57 |
-
gr.Markdown("# Face Recognition with
|
58 |
gr.Markdown("Compare two faces to calculate their cosine similarity.")
|
59 |
|
60 |
with gr.Row():
|
@@ -71,5 +71,16 @@ with gr.Blocks() as iface:
|
|
71 |
outputs=similarity_output
|
72 |
)
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
# Launch the interface
|
75 |
iface.launch()
|
|
|
54 |
|
55 |
# Create Gradio interface with custom layout
|
56 |
with gr.Blocks() as iface:
|
57 |
+
gr.Markdown("# Face Recognition with TopoFR")
|
58 |
gr.Markdown("Compare two faces to calculate their cosine similarity.")
|
59 |
|
60 |
with gr.Row():
|
|
|
71 |
outputs=similarity_output
|
72 |
)
|
73 |
|
74 |
+
# Add examples
|
75 |
+
gr.Examples(
|
76 |
+
examples=[
|
77 |
+
["examples/yong1.png", "examples/yong2.png"],
|
78 |
+
["examples/yong1.png", "examples/barboon.jpeg"],
|
79 |
+
["examples/yong2.png", "examples/barboon.jpeg"],
|
80 |
+
],
|
81 |
+
inputs=[img1_input, img2_input],
|
82 |
+
label="Example Image Pairs"
|
83 |
+
)
|
84 |
+
|
85 |
# Launch the interface
|
86 |
iface.launch()
|
examples/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
examples/barboon.jpeg
ADDED
![]() |
examples/yong1.png
ADDED
![]() |
examples/yong2.png
ADDED
![]() |