Spaces:
Paused
Paused
Update app_gradio.py
Browse files- app_gradio.py +2 -60
app_gradio.py
CHANGED
|
@@ -200,65 +200,7 @@ def generate_output(image, prompt: str, num_seeds: int = 3, lambda_value: float
|
|
| 200 |
|
| 201 |
return filtered_gifs
|
| 202 |
|
| 203 |
-
css="""
|
| 204 |
-
.container {
|
| 205 |
-
max-width: 1200px;
|
| 206 |
-
margin: 0 auto;
|
| 207 |
-
padding: 20px;
|
| 208 |
-
}
|
| 209 |
-
.example-gallery {
|
| 210 |
-
margin: 20px 0;
|
| 211 |
-
padding: 20px;
|
| 212 |
-
background: #f7f7f7;
|
| 213 |
-
border-radius: 8px;
|
| 214 |
-
}
|
| 215 |
-
.selected-example {
|
| 216 |
-
margin: 20px 0;
|
| 217 |
-
padding: 20px;
|
| 218 |
-
background: #ffffff;
|
| 219 |
-
border-radius: 8px;
|
| 220 |
-
|
| 221 |
-
}
|
| 222 |
-
.controls-section {
|
| 223 |
-
background: #ffffff;
|
| 224 |
-
padding: 20px;
|
| 225 |
-
margin: 20px 0;
|
| 226 |
-
border-radius: 8px;
|
| 227 |
-
|
| 228 |
-
}
|
| 229 |
-
.output-gallery {
|
| 230 |
-
min-height: 500px;
|
| 231 |
-
margin: 20px 0;
|
| 232 |
-
padding: 20px;
|
| 233 |
-
background: #f7f7f7;
|
| 234 |
-
border-radius: 8px;
|
| 235 |
-
}
|
| 236 |
-
.example-item {
|
| 237 |
-
border-radius: 8px;
|
| 238 |
-
overflow: hidden;
|
| 239 |
-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
| 240 |
-
transition: transform 0.2s;
|
| 241 |
-
cursor: pointer;
|
| 242 |
-
}
|
| 243 |
-
.example-item:hover {
|
| 244 |
-
transform: scale(1.05);
|
| 245 |
-
}
|
| 246 |
-
/* Prevent gallery images from expanding */
|
| 247 |
-
.gallery-image {
|
| 248 |
-
height: 200px !important;
|
| 249 |
-
width: 200px !important;
|
| 250 |
-
object-fit: cover !important;
|
| 251 |
-
}
|
| 252 |
-
.generate-btn {
|
| 253 |
-
width: 100%;
|
| 254 |
-
margin-top: 1rem;
|
| 255 |
-
}
|
| 256 |
-
|
| 257 |
-
.generate-btn:disabled {
|
| 258 |
-
opacity: 0.7;
|
| 259 |
-
cursor: not-allowed;
|
| 260 |
-
}
|
| 261 |
-
"""
|
| 262 |
|
| 263 |
def create_gradio_interface():
|
| 264 |
with gr.Blocks(css=css) as demo:
|
|
@@ -308,7 +250,7 @@ def create_gradio_interface():
|
|
| 308 |
['./static/examples/sketch11.png', 'The jazz saxophonist performs on stage with a rhythmic sway, his upper body sways subtly to the rhythm of the music.'],
|
| 309 |
['./static/examples/sketch12.png', 'The biker rides on the road']
|
| 310 |
],
|
| 311 |
-
inputs=[
|
| 312 |
examples_per_page=1
|
| 313 |
)
|
| 314 |
|
|
|
|
| 200 |
|
| 201 |
return filtered_gifs
|
| 202 |
|
| 203 |
+
css=""" """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
|
| 205 |
def create_gradio_interface():
|
| 206 |
with gr.Blocks(css=css) as demo:
|
|
|
|
| 250 |
['./static/examples/sketch11.png', 'The jazz saxophonist performs on stage with a rhythmic sway, his upper body sways subtly to the rhythm of the music.'],
|
| 251 |
['./static/examples/sketch12.png', 'The biker rides on the road']
|
| 252 |
],
|
| 253 |
+
inputs=[input_sketch, motion_prompt],
|
| 254 |
examples_per_page=1
|
| 255 |
)
|
| 256 |
|