Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -162,6 +162,10 @@ def preload_presets(target_ratio, ui_width, ui_height):
|
|
162 |
changed_width = 1280
|
163 |
changed_height = 720
|
164 |
return changed_width, changed_height, gr.update(open=False)
|
|
|
|
|
|
|
|
|
165 |
elif target_ratio == "Custom":
|
166 |
return ui_width, ui_height, gr.update(open=True)
|
167 |
|
@@ -213,7 +217,7 @@ with gr.Blocks(css=css) as demo:
|
|
213 |
with gr.Row():
|
214 |
target_ratio = gr.Radio(
|
215 |
label="Expected Ratio",
|
216 |
-
choices=["9:16", "16:9", "Custom"],
|
217 |
value="9:16",
|
218 |
scale=2
|
219 |
)
|
|
|
162 |
changed_width = 1280
|
163 |
changed_height = 720
|
164 |
return changed_width, changed_height, gr.update(open=False)
|
165 |
+
elif target_ratio == "1:1":
|
166 |
+
changed_width = 1024
|
167 |
+
changed_height = 1024
|
168 |
+
return changed_width, changed_height, gr.update(open=False)
|
169 |
elif target_ratio == "Custom":
|
170 |
return ui_width, ui_height, gr.update(open=True)
|
171 |
|
|
|
217 |
with gr.Row():
|
218 |
target_ratio = gr.Radio(
|
219 |
label="Expected Ratio",
|
220 |
+
choices=["9:16", "16:9", "1:1", "Custom"],
|
221 |
value="9:16",
|
222 |
scale=2
|
223 |
)
|