Spaces:
Running
Running
Sebastiankay
commited on
Commit
·
465449c
1
Parent(s):
8c34248
7. Okt. 2024, 01:45
Browse files
app.py
CHANGED
@@ -211,12 +211,13 @@ with gr.Blocks(theme=theme, head=custom_head, css=custom_css, js=custom_js, titl
|
|
211 |
def switch_image_ratio_buttons(ratio_value):
|
212 |
ratio_value = ratio_value.split(":")
|
213 |
ratio_value_new = f"{int(ratio_value[1])}:{int(ratio_value[0])}"
|
|
|
214 |
|
215 |
-
if ratio_value[1] > ratio_value[0]:
|
216 |
# Querformat
|
217 |
new_choises = ["16:9", "4:3", "3:2", "1:1"]
|
218 |
new_label = "Querformat"
|
219 |
-
elif ratio_value[1] < ratio_value[0]:
|
220 |
# Hochformat
|
221 |
new_choises = ["9:16", "3:4", "2:3", "1:1"]
|
222 |
new_label = "Hochformat"
|
|
|
211 |
def switch_image_ratio_buttons(ratio_value):
|
212 |
ratio_value = ratio_value.split(":")
|
213 |
ratio_value_new = f"{int(ratio_value[1])}:{int(ratio_value[0])}"
|
214 |
+
print("ratio_value_new:", ratio_value_new)
|
215 |
|
216 |
+
if int(ratio_value[1]) > int(ratio_value[0]):
|
217 |
# Querformat
|
218 |
new_choises = ["16:9", "4:3", "3:2", "1:1"]
|
219 |
new_label = "Querformat"
|
220 |
+
elif int(ratio_value[1]) < int(ratio_value[0]):
|
221 |
# Hochformat
|
222 |
new_choises = ["9:16", "3:4", "2:3", "1:1"]
|
223 |
new_label = "Hochformat"
|