Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -149,22 +149,22 @@ def process_output(output):
|
|
149 |
raise TypeError("Unexpected output type")
|
150 |
|
151 |
def main():
|
152 |
-
video_file = gr.
|
153 |
-
quality = gr.
|
154 |
choices=["18", "23", "27", "28", "32"], label="Quality", default="27")
|
155 |
-
aspect_ratio = gr.
|
156 |
choices=["16:9", "1:1", "4:3", "3:2", "5:4", "21:9",
|
157 |
"1.85:1", "2.35:1", "3:1", "360", "9:16", "16:9",
|
158 |
"2:1", "1:2", "9:1"],
|
159 |
label="Aspect Ratio", default="16:9")
|
160 |
-
video_url = gr.
|
161 |
-
api_key = gr.
|
162 |
-
upload = gr.
|
163 |
|
164 |
gr.Interface(
|
165 |
convert_video,
|
166 |
inputs=[video_file, quality, aspect_ratio, video_url, api_key, upload],
|
167 |
-
outputs=gr.outputs.
|
168 |
output_processor=process_output,
|
169 |
allow_flagging=False,
|
170 |
live=False,
|
|
|
149 |
raise TypeError("Unexpected output type")
|
150 |
|
151 |
def main():
|
152 |
+
video_file = gr.inputs.File(label="Video File")
|
153 |
+
quality = gr.inputs.Dropdown(
|
154 |
choices=["18", "23", "27", "28", "32"], label="Quality", default="27")
|
155 |
+
aspect_ratio = gr.inputs.Dropdown(
|
156 |
choices=["16:9", "1:1", "4:3", "3:2", "5:4", "21:9",
|
157 |
"1.85:1", "2.35:1", "3:1", "360", "9:16", "16:9",
|
158 |
"2:1", "1:2", "9:1"],
|
159 |
label="Aspect Ratio", default="16:9")
|
160 |
+
video_url = gr.inputs.Textbox(label="Video URL")
|
161 |
+
api_key = gr.inputs.Textbox(label="web3.storage API Key")
|
162 |
+
upload = gr.inputs.Checkbox(label="Upload to web3.storage", default=False)
|
163 |
|
164 |
gr.Interface(
|
165 |
convert_video,
|
166 |
inputs=[video_file, quality, aspect_ratio, video_url, api_key, upload],
|
167 |
+
outputs=gr.outputs.Textbox(),
|
168 |
output_processor=process_output,
|
169 |
allow_flagging=False,
|
170 |
live=False,
|