Spaces:
Sleeping
Sleeping
Commit
·
2fde305
1
Parent(s):
d520648
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,8 +43,9 @@ def save_image():
|
|
| 43 |
upload_image_path = "processed_image.jpg"
|
| 44 |
cv2.imwrite(upload_image_path, opencv_image)
|
| 45 |
|
| 46 |
-
st.
|
| 47 |
-
st.success("Processing Image
|
|
|
|
| 48 |
|
| 49 |
# label of image:
|
| 50 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt') # local model
|
|
@@ -78,8 +79,6 @@ def save_image():
|
|
| 78 |
st.text("Detected Gesture")
|
| 79 |
st.image(detect_image_pred, caption="Detected Image", use_column_width=True)
|
| 80 |
|
| 81 |
-
st.text("Detection class probabilities")
|
| 82 |
-
|
| 83 |
else:
|
| 84 |
st.text("Detection Threshold is 60")
|
| 85 |
st.text("Detection Gesture")
|
|
|
|
| 43 |
upload_image_path = "processed_image.jpg"
|
| 44 |
cv2.imwrite(upload_image_path, opencv_image)
|
| 45 |
|
| 46 |
+
st.text("Detection class probabilities")
|
| 47 |
+
st.success(f"Processing Image as {upload_image_path}")
|
| 48 |
+
|
| 49 |
|
| 50 |
# label of image:
|
| 51 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt') # local model
|
|
|
|
| 79 |
st.text("Detected Gesture")
|
| 80 |
st.image(detect_image_pred, caption="Detected Image", use_column_width=True)
|
| 81 |
|
|
|
|
|
|
|
| 82 |
else:
|
| 83 |
st.text("Detection Threshold is 60")
|
| 84 |
st.text("Detection Gesture")
|