Spaces:
Paused
Paused
Update app_gradio.py
Browse files- app_gradio.py +11 -5
app_gradio.py
CHANGED
@@ -226,7 +226,7 @@ def create_gradio_interface():
|
|
226 |
with gr.Row():
|
227 |
with gr.Column():
|
228 |
|
229 |
-
with gr.Tab("Main"):
|
230 |
input_sketch = gr.Image(
|
231 |
type="pil",
|
232 |
label="Selected Sketch",
|
@@ -287,6 +287,9 @@ def create_gradio_interface():
|
|
287 |
|
288 |
|
289 |
with gr.Column():
|
|
|
|
|
|
|
290 |
gr.Examples(
|
291 |
examples=[
|
292 |
['./static/examples/sketch1.png', 'The camel walks slowly'],
|
@@ -301,10 +304,13 @@ def create_gradio_interface():
|
|
301 |
['./static/examples/sketch10.png', 'The cloud floats in the sky'],
|
302 |
['./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.'],
|
303 |
['./static/examples/sketch12.png', 'The biker rides on the road']
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
|
|
|
|
|
|
308 |
|
309 |
|
310 |
output_gallery = gr.Gallery(
|
|
|
226 |
with gr.Row():
|
227 |
with gr.Column():
|
228 |
|
229 |
+
with gr.Tab("Main") as main_tab:
|
230 |
input_sketch = gr.Image(
|
231 |
type="pil",
|
232 |
label="Selected Sketch",
|
|
|
287 |
|
288 |
|
289 |
with gr.Column():
|
290 |
+
def load_examples(input_sketch, motion_prompt):
|
291 |
+
return gr.update(open=True)
|
292 |
+
|
293 |
gr.Examples(
|
294 |
examples=[
|
295 |
['./static/examples/sketch1.png', 'The camel walks slowly'],
|
|
|
304 |
['./static/examples/sketch10.png', 'The cloud floats in the sky'],
|
305 |
['./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.'],
|
306 |
['./static/examples/sketch12.png', 'The biker rides on the road']
|
307 |
+
],
|
308 |
+
fn=load_examples,
|
309 |
+
inputs=[input_sketch, motion_prompt],
|
310 |
+
outputs=[main_tab],
|
311 |
+
examples_per_page=4,
|
312 |
+
|
313 |
+
)
|
314 |
|
315 |
|
316 |
output_gallery = gr.Gallery(
|