Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -198,6 +198,7 @@ class VideoStreaming(object):
|
|
198 |
}
|
199 |
|
200 |
if url == '0':
|
|
|
201 |
cap = cv2.VideoCapture(0)
|
202 |
else:
|
203 |
|
@@ -218,6 +219,7 @@ class VideoStreaming(object):
|
|
218 |
if not grabbed:
|
219 |
break
|
220 |
if self.flipH:
|
|
|
221 |
frame = cv2.flip(frame, 1)
|
222 |
|
223 |
if self.detect:
|
@@ -251,7 +253,7 @@ class VideoStreaming(object):
|
|
251 |
landmark_drawing_spec=mp.solutions.drawing_utils.DrawingSpec(color=(255, 0, 0), thickness=4, circle_radius=3),
|
252 |
connection_drawing_spec=mp.solutions.drawing_utils.DrawingSpec(color=(255, 255, 255), thickness=2, circle_radius=2),
|
253 |
)
|
254 |
-
|
255 |
frame = cv2.imencode(".jpg", frame)[1].tobytes()
|
256 |
yield (
|
257 |
b'--frame\r\n'
|
|
|
198 |
}
|
199 |
|
200 |
if url == '0':
|
201 |
+
print("am here with 0 to start cam")
|
202 |
cap = cv2.VideoCapture(0)
|
203 |
else:
|
204 |
|
|
|
219 |
if not grabbed:
|
220 |
break
|
221 |
if self.flipH:
|
222 |
+
print("flip part :")
|
223 |
frame = cv2.flip(frame, 1)
|
224 |
|
225 |
if self.detect:
|
|
|
253 |
landmark_drawing_spec=mp.solutions.drawing_utils.DrawingSpec(color=(255, 0, 0), thickness=4, circle_radius=3),
|
254 |
connection_drawing_spec=mp.solutions.drawing_utils.DrawingSpec(color=(255, 255, 255), thickness=2, circle_radius=2),
|
255 |
)
|
256 |
+
print("frame information in here : ")
|
257 |
frame = cv2.imencode(".jpg", frame)[1].tobytes()
|
258 |
yield (
|
259 |
b'--frame\r\n'
|