Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -166,7 +166,7 @@ def preview_image_and_mask(image, width, height, overlap_percentage, resize_opti
|
|
| 166 |
|
| 167 |
return preview
|
| 168 |
|
| 169 |
-
@spaces.GPU(duration=
|
| 170 |
def infer(image, width, height, overlap_percentage, num_inference_steps, resize_option, custom_resize_percentage, prompt_input, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom):
|
| 171 |
background, mask = prepare_image_and_mask(image, width, height, overlap_percentage, resize_option, custom_resize_percentage, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom)
|
| 172 |
|
|
@@ -245,11 +245,24 @@ def update_history(new_image, history):
|
|
| 245 |
|
| 246 |
css = """
|
| 247 |
.gradio-container {
|
| 248 |
-
width: 1200px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 249 |
}
|
| 250 |
-
h1 { text-align: center; }
|
| 251 |
-
footer { visibility: hidden; }
|
| 252 |
-
"""
|
| 253 |
|
| 254 |
title = """<h1 align="center">Diffusers Image Outpaint Lightning</h1>
|
| 255 |
"""
|
|
|
|
| 166 |
|
| 167 |
return preview
|
| 168 |
|
| 169 |
+
@spaces.GPU(duration=20)
|
| 170 |
def infer(image, width, height, overlap_percentage, num_inference_steps, resize_option, custom_resize_percentage, prompt_input, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom):
|
| 171 |
background, mask = prepare_image_and_mask(image, width, height, overlap_percentage, resize_option, custom_resize_percentage, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom)
|
| 172 |
|
|
|
|
| 245 |
|
| 246 |
css = """
|
| 247 |
.gradio-container {
|
| 248 |
+
max-width: 1200px !important;
|
| 249 |
+
margin: auto !important;
|
| 250 |
+
}
|
| 251 |
+
/* Add some spacing */
|
| 252 |
+
.gr-form > * {
|
| 253 |
+
margin-bottom: 10px;
|
| 254 |
+
}
|
| 255 |
+
.gr-button {
|
| 256 |
+
min-width: 100px; /* Ensure buttons have a minimum width */
|
| 257 |
+
}
|
| 258 |
+
/* Style the history gallery */
|
| 259 |
+
#history_gallery .gr-gallery {
|
| 260 |
+
min-height: 150px; /* Give gallery some minimum height */
|
| 261 |
+
}
|
| 262 |
+
#history_gallery .gr-gallery > .gr-image {
|
| 263 |
+
border: 1px solid #ddd; /* Add subtle border to gallery images */
|
| 264 |
+
border-radius: 4px;
|
| 265 |
}
|
|
|
|
|
|
|
|
|
|
| 266 |
|
| 267 |
title = """<h1 align="center">Diffusers Image Outpaint Lightning</h1>
|
| 268 |
"""
|