randomshit11 commited on
Commit
5acc94f
·
verified ·
1 Parent(s): 33fa186

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -60,20 +60,18 @@ def show_preds_video(video_path):
60
  cv2.FONT_HERSHEY_SIMPLEX, 1.3, (0, 0, 255), 3, cv2.LINE_AA)
61
 
62
  yield cv2.cvtColor(frame_copy, cv2.COLOR_BGR2RGB)
63
-
64
- inputs_video = [
65
- gr.components.Video(type="filepath", label="Input Video"),
66
-
67
- ]
68
- outputs_video = [
69
- gr.components.Image(type="numpy", label="Output Image"),
70
- ]
71
  interface_video = gr.Interface(
72
  fn=show_preds_video,
73
- inputs=inputs_video,
74
- outputs=outputs_video,
75
  title="Cattle detector using YOLOV8 NANO",
76
- examples=video_path,
77
  cache_examples=False,
78
  )
79
 
 
60
  cv2.FONT_HERSHEY_SIMPLEX, 1.3, (0, 0, 255), 3, cv2.LINE_AA)
61
 
62
  yield cv2.cvtColor(frame_copy, cv2.COLOR_BGR2RGB)
63
+ inputs = [
64
+ gr.Video(label='Input Video')]
65
+ outputs = gr.Video(label='Output Video')
66
+
67
+
68
+
 
 
69
  interface_video = gr.Interface(
70
  fn=show_preds_video,
71
+ inputs=inputs,
72
+ outputs=outputs,
73
  title="Cattle detector using YOLOV8 NANO",
74
+ # examples=video_path,
75
  cache_examples=False,
76
  )
77