Jeffgold commited on
Commit
c901c1e
·
1 Parent(s): 9412aac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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.inputs.File(label="Video File", type="file")
103
- quality = gr.inputs.Dropdown(
104
  choices=["18", "23", "28", "32"], label="Quality", default="23")
105
- aspect_ratio = gr.inputs.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.inputs.Textbox(label="Video URL")
111
- api_key = gr.inputs.Textbox(label="web3.storage API Key")
112
- upload = gr.inputs.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.outputs.Download(label="Download File"),
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