npc0 commited on
Commit
ddb6238
·
1 Parent(s): fc9bb68

add webcam as input image

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -65,5 +65,5 @@ def greet(image_to_test):
65
  img = face_recognition.load_image_file(os.path.join("data", filepath))
66
  return img, ret
67
 
68
- iface = gr.Interface(fn=greet, inputs=gr.Image(type="numpy"), outputs=["image", "text"])
69
  iface.launch()
 
65
  img = face_recognition.load_image_file(os.path.join("data", filepath))
66
  return img, ret
67
 
68
+ iface = gr.Interface(fn=greet, inputs=gr.Image(source="webcam", streaming=True, type="numpy"), outputs=["image", "text"])
69
  iface.launch()