Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -97,20 +97,18 @@ def convert_video(video_file, quality, aspect_ratio, video_url):
|
|
97 |
return output_html
|
98 |
|
99 |
# Change "video" to "file"
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
# Define a sliding scale for the quality
|
105 |
-
quality = gr.inputs.Slider(minimum=1, maximum=50, default=23, label="Quality (1 - Speed, 50 - Quality)")
|
106 |
|
107 |
# Update the aspect ratio selection to include the comprehensive list
|
108 |
aspect_ratio = gr.inputs.Dropdown(choices=aspect_ratios, label="Aspect Ratio", default="16:9")
|
109 |
|
110 |
-
interface =
|
111 |
fn=convert_video,
|
112 |
inputs=[video_file, quality, aspect_ratio, video_url],
|
113 |
-
outputs=
|
114 |
title="NEAR Hub Video Transcoder to m3u8",
|
115 |
description="convert video files to m3u8 for VOD streaming",
|
116 |
allow_flagging=False
|
|
|
97 |
return output_html
|
98 |
|
99 |
# Change "video" to "file"
|
100 |
+
video_file = gradio.inputs.File(label="Your video file")
|
101 |
+
quality = gradio.inputs.Slider(minimum=1, maximum=50, default=25, label="Quality (1:Speed - 50:Quality)")
|
102 |
+
aspect_ratio = gradio.inputs.Dropdown(["16:9", "4:3", "1:1", "3:4", "9:16", "1:1", "2:1", "1:2"], label="Aspect Ratio", default="16:9")
|
103 |
+
video_url = gradio.inputs.Textbox(lines=1, placeholder="or paste video url here", label="Video URL")
|
|
|
|
|
104 |
|
105 |
# Update the aspect ratio selection to include the comprehensive list
|
106 |
aspect_ratio = gr.inputs.Dropdown(choices=aspect_ratios, label="Aspect Ratio", default="16:9")
|
107 |
|
108 |
+
interface = gradio.Interface(
|
109 |
fn=convert_video,
|
110 |
inputs=[video_file, quality, aspect_ratio, video_url],
|
111 |
+
outputs=gradio.outputs.HTML(label="Download Links"),
|
112 |
title="NEAR Hub Video Transcoder to m3u8",
|
113 |
description="convert video files to m3u8 for VOD streaming",
|
114 |
allow_flagging=False
|