apailang commited on
Commit
d177d66
β€’
1 Parent(s): 4228f7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -12
app.py CHANGED
@@ -131,18 +131,24 @@ detection_model = load_model()
131
  # ).launch(share=True)
132
 
133
 
134
- # Second interface for video prediction
135
- video_interface = gr.Interface(
136
- fn=detect_video,
137
- inputs=gr.Video(interactive=True),
 
 
 
 
138
  outputs=gr.Video(),
139
- title="Video Prediction Interface",
140
- description="Upload a video for prediction",
141
- live=True
142
- )
143
-
144
- # Launch both interfaces
145
- #image_interface.launch(share=True)
146
- video_interface.launch(share=True)
 
 
147
 
148
 
 
131
  # ).launch(share=True)
132
 
133
 
134
+ a = os.path.join(os.path.dirname(__file__), "data/a.mp4") # Video
135
+ b = os.path.join(os.path.dirname(__file__), "data/b.mp4") # Video
136
+ c = os.path.join(os.path.dirname(__file__), "data/c.mp4") # Video
137
+
138
+
139
+ demo = gr.Interface(
140
+ fn=lambda x: x,
141
+ inputs=gr.Video(),
142
  outputs=gr.Video(),
143
+ examples=[
144
+ [a],
145
+ [b],
146
+ [c],
147
+ ],
148
+ cache_examples=True
149
+ )
150
+
151
+ if __name__ == "__main__":
152
+ demo.launch()
153
 
154