Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,22 +102,22 @@ def convert_video(video_file, quality, aspect_ratio, video_url, api_key, upload)
|
|
| 102 |
return output_copy_path
|
| 103 |
|
| 104 |
def main():
|
| 105 |
-
video_file = gr.
|
| 106 |
-
quality = gr.
|
| 107 |
choices=["18", "23", "28", "32"], label="Quality", default="23")
|
| 108 |
-
aspect_ratio = gr.
|
| 109 |
choices=[None, "1:1", "4:3", "3:2", "5:4", "16:9", "21:9",
|
| 110 |
"1.85:1", "2.35:1", "3:1", "360", "9:16", "16:9",
|
| 111 |
"2:1", "1:2", "9:1"],
|
| 112 |
label="Aspect Ratio", default=None)
|
| 113 |
-
video_url = gr.
|
| 114 |
-
api_key = gr.
|
| 115 |
-
upload = gr.
|
| 116 |
|
| 117 |
gr.Interface(
|
| 118 |
convert_video,
|
| 119 |
inputs=[video_file, quality, aspect_ratio, video_url, api_key, upload],
|
| 120 |
-
outputs=gr.
|
| 121 |
live=True,
|
| 122 |
).launch()
|
| 123 |
|
|
|
|
| 102 |
return output_copy_path
|
| 103 |
|
| 104 |
def main():
|
| 105 |
+
video_file = gr.inputs.File(label="Video File")
|
| 106 |
+
quality = gr.inputs.Dropdown(
|
| 107 |
choices=["18", "23", "28", "32"], label="Quality", default="23")
|
| 108 |
+
aspect_ratio = gr.inputs.Dropdown(
|
| 109 |
choices=[None, "1:1", "4:3", "3:2", "5:4", "16:9", "21:9",
|
| 110 |
"1.85:1", "2.35:1", "3:1", "360", "9:16", "16:9",
|
| 111 |
"2:1", "1:2", "9:1"],
|
| 112 |
label="Aspect Ratio", default=None)
|
| 113 |
+
video_url = gr.inputs.Textbox(label="Video URL")
|
| 114 |
+
api_key = gr.inputs.Textbox(label="web3.storage API Key")
|
| 115 |
+
upload = gr.inputs.Checkbox(label="Upload to web3.storage", default=False)
|
| 116 |
|
| 117 |
gr.Interface(
|
| 118 |
convert_video,
|
| 119 |
inputs=[video_file, quality, aspect_ratio, video_url, api_key, upload],
|
| 120 |
+
outputs=gr.outputs.File(label="Download File"),
|
| 121 |
live=True,
|
| 122 |
).launch()
|
| 123 |
|