Spaces:
Paused
Paused
Update app.py
Browse files
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.
|
135 |
-
gr.
|
136 |
-
gr.
|
137 |
]
|
138 |
|
139 |
interface = gr.Interface(
|
140 |
fn=convert_video,
|
141 |
-
inputs=
|
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 |
-
|
|
|
|
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)
|