hassan526 commited on
Commit
7db9832
·
verified ·
1 Parent(s): 834feb3

Update gradio/app.py

Browse files
Files changed (1) hide show
  1. gradio/app.py +1 -21
gradio/app.py CHANGED
@@ -265,27 +265,7 @@ def launch_demo(activate_result):
265
  compare_face_button.click(compare_face_clicked, inputs=[compare_face_input1, compare_face_input2, txt_threshold], outputs=[face_output1, face_output2, compare_result, similarity_markdown, txt_bbox1, txt_bbox2, txt_feature1, txt_feature2, txt_speed])
266
 
267
  demo.launch(server_name="0.0.0.0", server_port=7860, show_api=False)
268
-
269
- def compare_faces(img1: Image.Image, img2: Image.Image) -> str:
270
- # Example placeholder logic — replace with your actual face comparison code
271
- # You can use your FaceSDK logic here
272
- if img1.size == img2.size:
273
- return "Match"
274
- else:
275
- return "No match"
276
 
277
  if __name__ == '__main__':
278
  g_activation_result = activate_sdk()
279
- # launch_demo(g_activation_result)
280
-
281
- # Create Gradio interface
282
- iface = gr.Interface(
283
- fn=compare_faces,
284
- inputs=["image", "image"],
285
- outputs="text",
286
- title="Face Comparison API",
287
- description="Upload two images to compare faces."
288
- )
289
-
290
- iface.launch()
291
-
 
265
  compare_face_button.click(compare_face_clicked, inputs=[compare_face_input1, compare_face_input2, txt_threshold], outputs=[face_output1, face_output2, compare_result, similarity_markdown, txt_bbox1, txt_bbox2, txt_feature1, txt_feature2, txt_speed])
266
 
267
  demo.launch(server_name="0.0.0.0", server_port=7860, show_api=False)
 
 
 
 
 
 
 
 
268
 
269
  if __name__ == '__main__':
270
  g_activation_result = activate_sdk()
271
+ launch_demo(g_activation_result)