arjunanand13 commited on
Commit
852dbb7
1 Parent(s): f273c5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -272,12 +272,19 @@ class VideoClassifier:
272
  }
273
  """
274
  model_dropdown = gr.inputs.Dropdown(choices=['gemini', 'mistral'], label="Select Model", default='gemini')
275
- demo = gr.Interface(fn=self.classify_video, inputs=["playablevideo", model_dropdown],allow_flagging='never', examples=[
276
- os.path.join(os.path.dirname(__file__),
277
- "American_football_heads_to_India_clip.mp4"),os.path.join(os.path.dirname(__file__), "videos/PersonalFinance_clip.mp4"),
278
  os.path.join(os.path.dirname(__file__), "Motorcycle_clip.mp4"),
279
  os.path.join(os.path.dirname(__file__), "Spirituality_1_clip.mp4"),
280
  os.path.join(os.path.dirname(__file__), "Science_clip.mp4")],
 
 
 
 
 
 
 
281
  cache_examples=False, outputs=["text", gr.Video(height=80, width=120), gr.Video(height=80, width=120)],
282
  css=css_code, title="Interactive Advertising Bureau (IAB) compliant Video-Ad classification")
283
  demo.launch(debug=True)
 
272
  }
273
  """
274
  model_dropdown = gr.inputs.Dropdown(choices=['gemini', 'mistral'], label="Select Model", default='gemini')
275
+ demo = gr.Interface(fn=self.classify_video, inputs=[model_dropdown,"playablevideo" ],allow_flagging='never',
276
+ examples=[ os.path.join(os.path.dirname(__file__),"American_football_heads_to_India_clip.mp4"),
277
+ os.path.join(os.path.dirname(__file__), "videos/PersonalFinance_clip.mp4"),
278
  os.path.join(os.path.dirname(__file__), "Motorcycle_clip.mp4"),
279
  os.path.join(os.path.dirname(__file__), "Spirituality_1_clip.mp4"),
280
  os.path.join(os.path.dirname(__file__), "Science_clip.mp4")],
281
+ examples = [
282
+ ['gemini',"videos/American_football_heads_to_India_clip.mp4"],
283
+ ['mistral',"videos/PersonalFinance_clip.mp4"],
284
+ ['gemini',"videos/Motorcycle_clip.mp4"],
285
+ ['mistral',"videos/Spirituality_1_clip.mp4"],
286
+ ['gemini',"videos/Science_clip.mp4"]
287
+ ]
288
  cache_examples=False, outputs=["text", gr.Video(height=80, width=120), gr.Video(height=80, width=120)],
289
  css=css_code, title="Interactive Advertising Bureau (IAB) compliant Video-Ad classification")
290
  demo.launch(debug=True)