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