Jeffgold commited on
Commit
99535b7
·
1 Parent(s): 2d3ac4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -8
app.py CHANGED
@@ -130,20 +130,34 @@ aspect_ratio = gr.inputs.Dropdown(
130
  standard_resolutions = [4320, 2160, 1440, 1080, 720, 480, 360, 240, 144] # 8K, 4K, 2K, Full HD, HD, SD in pixels
131
  video_url = gr.inputs.Textbox(label="Or enter video URL")
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  outputs = [
134
- gr.outputs.HTML(label="Download Links"),
135
- gr.outputs.Video(label="Video Player"),
136
- gr.outputs.Textbox(label="Text Files", type="text")
137
  ]
138
 
139
  interface = gr.Interface(
140
  fn=convert_video,
141
- inputs=[video_file, quality, aspect_ratio, video_url],
142
  outputs=outputs,
143
  title="Video Converter",
144
  description="A simple video converter app",
145
- allow_flagging=False,
146
- server_name="0.0.0.0",
147
- server_port=7860,
148
  )
149
- interface.launch()
 
 
130
  standard_resolutions = [4320, 2160, 1440, 1080, 720, 480, 360, 240, 144] # 8K, 4K, 2K, Full HD, HD, SD in pixels
131
  video_url = gr.inputs.Textbox(label="Or enter video URL")
132
 
133
+ inputs = [
134
+ gr.components.File(label="Video File"),
135
+ gr.components.Dropdown(
136
+ choices=["18", "23", "27", "28", "32"],
137
+ default="27",
138
+ label="Quality"
139
+ ),
140
+ gr.components.Dropdown(
141
+ choices=["16:9", "1:1", "4:3", "3:2", "5:4", "21:9", "1.85:1", "2.35:1", "3:1", "360", "9:16", "2:1", "1:2", "9:1"],
142
+ default="16:9",
143
+ label="Aspect ratio (width:height)"
144
+ ),
145
+ gr.components.Textbox(label="Or enter video URL")
146
+ ]
147
+
148
  outputs = [
149
+ gr.components.HTML(label="Download Links"),
150
+ gr.components.Video(label="Video Player"),
151
+ gr.components.Textbox(label="Text Files", type="text")
152
  ]
153
 
154
  interface = gr.Interface(
155
  fn=convert_video,
156
+ inputs=inputs,
157
  outputs=outputs,
158
  title="Video Converter",
159
  description="A simple video converter app",
160
+ allow_flagging=False
 
 
161
  )
162
+
163
+ interface.launch(server_name="0.0.0.0", server_port=7860)