Spaces:
Running
on
Zero
Running
on
Zero
add examples
Browse files- gradio_app.py +35 -0
- gradio_examples/lego.png +0 -0
- gradio_examples/portrait.png +0 -0
- gradio_examples/sketch.png +0 -0
- gradio_examples/wood_sculpture.png +0 -0
gradio_app.py
CHANGED
@@ -327,5 +327,40 @@ with gr.Blocks() as demo:
|
|
327 |
# Run Button
|
328 |
run_button.click(fn=infer, inputs=[prompt, sample_image, recraft_model, seed], outputs=[result_image])
|
329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
# Launch the Gradio app
|
331 |
demo.launch()
|
|
|
327 |
# Run Button
|
328 |
run_button.click(fn=infer, inputs=[prompt, sample_image, recraft_model, seed], outputs=[result_image])
|
329 |
|
330 |
+
gr.Markdown("### Examples")
|
331 |
+
examples = [
|
332 |
+
[
|
333 |
+
"sks14, 2*2 puzzle of 4 sub-images, step-by-step wood sculpture carving process", # prompt
|
334 |
+
"./gradio_examples/wood_sculpture.png",
|
335 |
+
"Wood Sculpture", # recraft_model
|
336 |
+
12345 # seed
|
337 |
+
],
|
338 |
+
[
|
339 |
+
"sks1, 3*3 puzzle of 9 sub-images, step-by-step lego model construction process", # prompt
|
340 |
+
"./gradio_examples/lego.png",
|
341 |
+
"LEGO", # recraft_model
|
342 |
+
42 # seed
|
343 |
+
],
|
344 |
+
[
|
345 |
+
"sks6, 3*3 puzzle of 9 sub-images, step-by-step portrait painting process", # prompt
|
346 |
+
"./gradio_examples/portrait.png",
|
347 |
+
"Portrait", # recraft_model
|
348 |
+
999 # seed
|
349 |
+
],
|
350 |
+
[
|
351 |
+
"sks10, 3*3 puzzle of 9 sub-images, step-by-step sketch painting process,", # prompt
|
352 |
+
"./gradio_examples/sketch.png",
|
353 |
+
"Sketch",
|
354 |
+
2023
|
355 |
+
]
|
356 |
+
]
|
357 |
+
|
358 |
+
gr.Examples(
|
359 |
+
examples=examples,
|
360 |
+
inputs=[prompt, sample_image, recraft_model, seed],
|
361 |
+
outputs=[result_image],
|
362 |
+
cache_examples=False
|
363 |
+
)
|
364 |
+
|
365 |
# Launch the Gradio app
|
366 |
demo.launch()
|
gradio_examples/lego.png
ADDED
![]() |
gradio_examples/portrait.png
ADDED
![]() |
gradio_examples/sketch.png
ADDED
![]() |
gradio_examples/wood_sculpture.png
ADDED
![]() |