Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
import ffmpeg
|
3 |
|
|
|
|
|
4 |
def transcode_video(video_file, output_file, output_format, output_fps):
|
5 |
"""Transcodes a video file to m3u8 using ffmpeg.
|
6 |
|
@@ -20,4 +22,4 @@ def transcode_video(video_file, output_file, output_format, output_fps):
|
|
20 |
# Return the path to the transcoded file.
|
21 |
return output_file
|
22 |
|
23 |
-
gr.Interface(transcode_video, inputs={"video_file":
|
|
|
1 |
import gradio as gr
|
2 |
import ffmpeg
|
3 |
|
4 |
+
from gradio.components import File, Output
|
5 |
+
|
6 |
def transcode_video(video_file, output_file, output_format, output_fps):
|
7 |
"""Transcodes a video file to m3u8 using ffmpeg.
|
8 |
|
|
|
22 |
# Return the path to the transcoded file.
|
23 |
return output_file
|
24 |
|
25 |
+
gr.Interface(transcode_video, inputs={"video_file": File("Select a video file")}, outputs={"output_file": Output("Output file")}).launch()
|