thimwai commited on
Commit
7433600
·
verified ·
1 Parent(s): eb285c2

Update label to fruits

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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 Emotion Detection")
73
 
74
  with gr.Tabs():
75
  # Tab 1: Image Inference
76
  with gr.Tab("Image Detection"):
77
- gr.Markdown("### Upload an Image for Emotion Detection")
78
  image_input = gr.Image(type="pil")
79
  image_output = gr.Image(type="numpy")
80
- image_btn = gr.Button("Detect Emotion")
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 Emotion Detection")
86
  video_input = gr.Video()
87
  video_output = gr.Video()
88
- video_btn = gr.Button("Detect Emotion in Video")
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