Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -235,13 +235,28 @@ def update_history(new_image, history):
|
|
| 235 |
return history
|
| 236 |
|
| 237 |
|
| 238 |
-
# --- CSS and
|
| 239 |
-
# CSS and title (unchanged)
|
| 240 |
css = """
|
| 241 |
h1 {
|
| 242 |
text-align: center;
|
| 243 |
display: block;
|
| 244 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
"""
|
| 246 |
|
| 247 |
title = """<h1 align="center">Diffusers Image Outpaint Lightning</h1>
|
|
|
|
| 235 |
return history
|
| 236 |
|
| 237 |
|
| 238 |
+
# --- CSS and Gradio UI ---
|
|
|
|
| 239 |
css = """
|
| 240 |
h1 {
|
| 241 |
text-align: center;
|
| 242 |
display: block;
|
| 243 |
}
|
| 244 |
+
/* Make gallery items smaller */
|
| 245 |
+
.gradio-container .gallery {
|
| 246 |
+
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; /* Adjust 120px as needed */
|
| 247 |
+
gap: 10px !important;
|
| 248 |
+
}
|
| 249 |
+
.gradio-container .gallery > .gallery-item {
|
| 250 |
+
height: auto !important; /* Allow height to adjust based on content */
|
| 251 |
+
max-height: 150px; /* Set a max height if needed */
|
| 252 |
+
overflow: hidden; /* Hide overflow */
|
| 253 |
+
}
|
| 254 |
+
.gradio-container .gallery > .gallery-item img {
|
| 255 |
+
object-fit: contain !important; /* Fit image within bounds */
|
| 256 |
+
height: 100% !important;
|
| 257 |
+
width: 100% !important;
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
"""
|
| 261 |
|
| 262 |
title = """<h1 align="center">Diffusers Image Outpaint Lightning</h1>
|