Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,11 @@ from gradio import components
|
|
5 |
|
6 |
import tempfile
|
7 |
|
8 |
-
video_file = gr.inputs.
|
9 |
-
quality = gr.inputs.Dropdown(choices=["18", "23", "28", "32"], label="Quality")
|
10 |
aspect_ratio = gr.inputs.Dropdown(choices=["16:9", "4:3", "3:2", "2:1"], label="Aspect Ratio", default="16:9")
|
11 |
|
12 |
-
def convert_video(video_file, quality, aspect_ratio):
|
13 |
output_path = f"{video_file.name}.m3u8"
|
14 |
|
15 |
temp_dir = tempfile.gettempdir()
|
|
|
5 |
|
6 |
import tempfile
|
7 |
|
8 |
+
video_file = gr.inputs.File(label="Video File")
|
9 |
+
quality = gr.inputs.Dropdown(choices=["18", "23", "28", "32"], label="Quality", default="23")
|
10 |
aspect_ratio = gr.inputs.Dropdown(choices=["16:9", "4:3", "3:2", "2:1"], label="Aspect Ratio", default="16:9")
|
11 |
|
12 |
+
def convert_video(video_file: File, quality, aspect_ratio):
|
13 |
output_path = f"{video_file.name}.m3u8"
|
14 |
|
15 |
temp_dir = tempfile.gettempdir()
|