Vikas01 commited on
Commit
98b16e3
·
1 Parent(s): 019ba9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -13
app.py CHANGED
@@ -79,19 +79,9 @@ def attend():
79
 
80
  @app.route('/at')
81
  def run_face_recognition():
82
- bytes_data=None
83
-
84
- img_file_buffer=gr.camera_input("Take a picture")
85
- if img_file_buffer is not None:
86
- test_image = Image.open(img_file_buffer)
87
- gr.image(test_image, use_column_width=True)
88
- gr.write(type(test_image))
89
- image = np.asarray(test_image)
90
- gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
91
-
92
- gr.image(cv2.cvtColor(gray))
93
- if bytes_data is None:
94
- gr.stop()
95
 
96
 
97
 
 
79
 
80
  @app.route('/at')
81
  def run_face_recognition():
82
+ demo=gr.Image(source="webcam",streaming=True),live=True)
83
+ demo.laumch()
84
+
 
 
 
 
 
 
 
 
 
 
85
 
86
 
87