Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -112,8 +112,8 @@ def infer(image, model_selection, ratio_choice):
|
|
112 |
if ratio_choice == "16:9":
|
113 |
target_ratio = (16, 9) # Set the new target ratio to 16:9
|
114 |
target_width = 1280 # Adjust target width based on desired resolution
|
115 |
-
overlap =
|
116 |
-
fade_width = 24
|
117 |
max_height = 720 # Adjust max height instead of width
|
118 |
|
119 |
# Resize the image if it's taller than max_height
|
@@ -171,8 +171,8 @@ def infer(image, model_selection, ratio_choice):
|
|
171 |
|
172 |
target_ratio=(9, 16)
|
173 |
target_height=1280
|
174 |
-
overlap=
|
175 |
-
fade_width=24
|
176 |
max_width = 720
|
177 |
# Resize the image if it's wider than max_width
|
178 |
if source.width > max_width:
|
@@ -269,6 +269,15 @@ with gr.Blocks(css=css) as demo:
|
|
269 |
)
|
270 |
|
271 |
run_button = gr.Button("Generate")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
|
273 |
with gr.Column():
|
274 |
result = ImageSlider(
|
|
|
112 |
if ratio_choice == "16:9":
|
113 |
target_ratio = (16, 9) # Set the new target ratio to 16:9
|
114 |
target_width = 1280 # Adjust target width based on desired resolution
|
115 |
+
overlap = 42
|
116 |
+
#fade_width = 24
|
117 |
max_height = 720 # Adjust max height instead of width
|
118 |
|
119 |
# Resize the image if it's taller than max_height
|
|
|
171 |
|
172 |
target_ratio=(9, 16)
|
173 |
target_height=1280
|
174 |
+
overlap=42
|
175 |
+
#fade_width=24
|
176 |
max_width = 720
|
177 |
# Resize the image if it's wider than max_width
|
178 |
if source.width > max_width:
|
|
|
269 |
)
|
270 |
|
271 |
run_button = gr.Button("Generate")
|
272 |
+
|
273 |
+
gr.Examples(
|
274 |
+
examples = [
|
275 |
+
["/examples/example_1.webp", "RealVisXL V5.0 Lightning", "16:9"],
|
276 |
+
["/examples/example_2.jpg", "RealVisXL V5.0 Lightning", "16:9"],
|
277 |
+
["/examples/example_3.jpg", "RealVisXL V5.0 Lightning", "9:16"]
|
278 |
+
],
|
279 |
+
inputs = [input_image, model_selection, ratio]
|
280 |
+
)
|
281 |
|
282 |
with gr.Column():
|
283 |
result = ImageSlider(
|