Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,7 +45,6 @@ if f is not None:
|
|
| 45 |
cv2.rectangle(frame, (x, y), (x+w, y+h), (255, 0, 0), 2)
|
| 46 |
|
| 47 |
# Display the frame with detected hands
|
| 48 |
-
st.image(frame, 'input')
|
| 49 |
|
| 50 |
if hands:
|
| 51 |
# Extract the region of interest for hand from the frame
|
|
@@ -63,6 +62,8 @@ if f is not None:
|
|
| 63 |
pred = array[pred]
|
| 64 |
if not out or out[-1] != pred:
|
| 65 |
out = out + pred
|
|
|
|
|
|
|
| 66 |
|
| 67 |
# Increment the frame counter
|
| 68 |
frame_count += 1
|
|
|
|
| 45 |
cv2.rectangle(frame, (x, y), (x+w, y+h), (255, 0, 0), 2)
|
| 46 |
|
| 47 |
# Display the frame with detected hands
|
|
|
|
| 48 |
|
| 49 |
if hands:
|
| 50 |
# Extract the region of interest for hand from the frame
|
|
|
|
| 62 |
pred = array[pred]
|
| 63 |
if not out or out[-1] != pred:
|
| 64 |
out = out + pred
|
| 65 |
+
if not hands:
|
| 66 |
+
st.write("No Hand")
|
| 67 |
|
| 68 |
# Increment the frame counter
|
| 69 |
frame_count += 1
|