Jeffgold commited on
Commit
5a14a12
·
1 Parent(s): c15f319

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import ffmpeg
3
- import os
4
 
 
5
 
6
  def transcode_video(video):
7
  """Transcodes a video file to m3u8 using ffmpeg.
@@ -28,8 +28,7 @@ demo = gr.Interface(transcode_video,
28
  gr.Video(),
29
  "playable_video",
30
  examples=[
31
- os.path.join(os.path.dirname(__file__),
32
- "video/video_sample.mp4")],
33
  cache_examples=True)
34
 
35
  if __name__ == "__main__":
 
1
  import gradio as gr
2
  import ffmpeg
 
3
 
4
+ import os
5
 
6
  def transcode_video(video):
7
  """Transcodes a video file to m3u8 using ffmpeg.
 
28
  gr.Video(),
29
  "playable_video",
30
  examples=[
31
+ video.path for video in gr.inputs.Video(accept=".mp4")],
 
32
  cache_examples=True)
33
 
34
  if __name__ == "__main__":