Update
Browse files
app.py
CHANGED
|
@@ -47,10 +47,10 @@ def process_video(start_button, stop_button, uploaded_video):
|
|
| 47 |
process = False
|
| 48 |
return None, ""
|
| 49 |
|
| 50 |
-
start_button = gr.
|
| 51 |
-
stop_button = gr.
|
| 52 |
-
frame = gr.
|
| 53 |
-
uploaded_video = gr.
|
| 54 |
|
| 55 |
webcam_interface = gr.Interface(
|
| 56 |
fn=process_webcam,
|
|
@@ -59,7 +59,6 @@ webcam_interface = gr.Interface(
|
|
| 59 |
live=True,
|
| 60 |
title="YOLO Image Segmentation (Webcam)",
|
| 61 |
description="This application uses the YOLO model to perform image segmentation on a webcam feed. Check 'Start' to begin. Check 'Stop' to end the process.",
|
| 62 |
-
theme="huggingface"
|
| 63 |
)
|
| 64 |
|
| 65 |
video_interface = gr.Interface(
|
|
@@ -69,7 +68,6 @@ video_interface = gr.Interface(
|
|
| 69 |
live=True,
|
| 70 |
title="YOLO Image Segmentation (Video)",
|
| 71 |
description="This application uses the YOLO model to perform image segmentation on an uploaded video. Upload a video and check 'Start' to begin. Check 'Stop' to end the process.",
|
| 72 |
-
theme="huggingface"
|
| 73 |
)
|
| 74 |
|
| 75 |
gr.TabbedInterface(
|
|
|
|
| 47 |
process = False
|
| 48 |
return None, ""
|
| 49 |
|
| 50 |
+
start_button = gr.components.Checkbox(label="Start")
|
| 51 |
+
stop_button = gr.components.Checkbox(label="Stop")
|
| 52 |
+
frame = gr.components.Video(label="Webcam Feed")
|
| 53 |
+
uploaded_video = gr.components.Video(label="Upload Video")
|
| 54 |
|
| 55 |
webcam_interface = gr.Interface(
|
| 56 |
fn=process_webcam,
|
|
|
|
| 59 |
live=True,
|
| 60 |
title="YOLO Image Segmentation (Webcam)",
|
| 61 |
description="This application uses the YOLO model to perform image segmentation on a webcam feed. Check 'Start' to begin. Check 'Stop' to end the process.",
|
|
|
|
| 62 |
)
|
| 63 |
|
| 64 |
video_interface = gr.Interface(
|
|
|
|
| 68 |
live=True,
|
| 69 |
title="YOLO Image Segmentation (Video)",
|
| 70 |
description="This application uses the YOLO model to perform image segmentation on an uploaded video. Upload a video and check 'Start' to begin. Check 'Stop' to end the process.",
|
|
|
|
| 71 |
)
|
| 72 |
|
| 73 |
gr.TabbedInterface(
|