scfive commited on
Commit
b862d21
·
verified ·
1 Parent(s): ef50afb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -36,10 +36,15 @@ def detect_on_video(video):
36
  return temp_video_path
37
 
38
  # Gradio Interface
 
 
 
 
 
39
  app = gr.Interface(
40
  fn=[detect_on_image, detect_on_video],
41
- inputs=[gr.inputs.Image(type="pil", label="Upload Image"), gr.inputs.Video(type="file", label="Upload Video")],
42
- outputs=[gr.outputs.Image(type="pil", label="Detected Image"), gr.outputs.Video(label="Detected Video")],
43
  title="WALDO30 YOLOv8 Object Detection",
44
  description="Upload an image or video to see object detection results using the WALDO30 YOLOv8 model."
45
  )
 
36
  return temp_video_path
37
 
38
  # Gradio Interface
39
+ image_input = gr.Image(type="pil", label="Upload Image")
40
+ video_input = gr.Video(type="file", label="Upload Video")
41
+ image_output = gr.Image(type="pil", label="Detected Image")
42
+ video_output = gr.Video(label="Detected Video")
43
+
44
  app = gr.Interface(
45
  fn=[detect_on_image, detect_on_video],
46
+ inputs=[image_input, video_input],
47
+ outputs=[image_output, video_output],
48
  title="WALDO30 YOLOv8 Object Detection",
49
  description="Upload an image or video to see object detection results using the WALDO30 YOLOv8 model."
50
  )