Update label to fruits
Browse files
app.py
CHANGED
|
@@ -69,23 +69,23 @@ def detect_emotion_video(video_path):
|
|
| 69 |
|
| 70 |
# Create Gradio Tabs
|
| 71 |
with gr.Blocks() as demo:
|
| 72 |
-
gr.Markdown("## YOLOv8
|
| 73 |
|
| 74 |
with gr.Tabs():
|
| 75 |
# Tab 1: Image Inference
|
| 76 |
with gr.Tab("Image Detection"):
|
| 77 |
-
gr.Markdown("### Upload an Image for
|
| 78 |
image_input = gr.Image(type="pil")
|
| 79 |
image_output = gr.Image(type="numpy")
|
| 80 |
-
image_btn = gr.Button("Detect
|
| 81 |
image_btn.click(detect_emotion, inputs=image_input, outputs=image_output)
|
| 82 |
|
| 83 |
# Tab 2: Video Inference
|
| 84 |
with gr.Tab("Video Detection"):
|
| 85 |
-
gr.Markdown("### Upload a Video for
|
| 86 |
video_input = gr.Video()
|
| 87 |
video_output = gr.Video()
|
| 88 |
-
video_btn = gr.Button("Detect
|
| 89 |
video_btn.click(detect_emotion_video, inputs=video_input, outputs=video_output)
|
| 90 |
|
| 91 |
# Launch the Gradio App
|
|
|
|
| 69 |
|
| 70 |
# Create Gradio Tabs
|
| 71 |
with gr.Blocks() as demo:
|
| 72 |
+
gr.Markdown("## YOLOv8 Fruits Detection")
|
| 73 |
|
| 74 |
with gr.Tabs():
|
| 75 |
# Tab 1: Image Inference
|
| 76 |
with gr.Tab("Image Detection"):
|
| 77 |
+
gr.Markdown("### Upload an Image for Fruits Detection")
|
| 78 |
image_input = gr.Image(type="pil")
|
| 79 |
image_output = gr.Image(type="numpy")
|
| 80 |
+
image_btn = gr.Button("Detect Fruit")
|
| 81 |
image_btn.click(detect_emotion, inputs=image_input, outputs=image_output)
|
| 82 |
|
| 83 |
# Tab 2: Video Inference
|
| 84 |
with gr.Tab("Video Detection"):
|
| 85 |
+
gr.Markdown("### Upload a Video for Fruits Detection")
|
| 86 |
video_input = gr.Video()
|
| 87 |
video_output = gr.Video()
|
| 88 |
+
video_btn = gr.Button("Detect Fruits in Video")
|
| 89 |
video_btn.click(detect_emotion_video, inputs=video_input, outputs=video_output)
|
| 90 |
|
| 91 |
# Launch the Gradio App
|