Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -116,7 +116,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 116 |
)
|
| 117 |
run_button = gr.Button("Run", scale=0, variant="primary")
|
| 118 |
|
| 119 |
-
result = gr.
|
| 120 |
|
| 121 |
with gr.Accordion("Advanced Settings", open=False):
|
| 122 |
num_images = gr.Slider(
|
|
@@ -176,19 +176,18 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 176 |
value=23,
|
| 177 |
)
|
| 178 |
|
| 179 |
-
|
| 180 |
with gr.Column(scale=1):
|
| 181 |
-
|
| 182 |
examples=examples,
|
| 183 |
inputs=prompt,
|
| 184 |
cache_examples=False,
|
| 185 |
)
|
| 186 |
|
| 187 |
use_negative_prompt.change(
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
)
|
| 193 |
|
| 194 |
gr.on(
|
|
|
|
| 116 |
)
|
| 117 |
run_button = gr.Button("Run", scale=0, variant="primary")
|
| 118 |
|
| 119 |
+
result = gr.Gallery(show_label=False, format="png", columns=2, object_fit="contain")
|
| 120 |
|
| 121 |
with gr.Accordion("Advanced Settings", open=False):
|
| 122 |
num_images = gr.Slider(
|
|
|
|
| 176 |
value=23,
|
| 177 |
)
|
| 178 |
|
|
|
|
| 179 |
with gr.Column(scale=1):
|
| 180 |
+
gr.Examples(
|
| 181 |
examples=examples,
|
| 182 |
inputs=prompt,
|
| 183 |
cache_examples=False,
|
| 184 |
)
|
| 185 |
|
| 186 |
use_negative_prompt.change(
|
| 187 |
+
fn=lambda x: gr.update(visible=x),
|
| 188 |
+
inputs=use_negative_prompt,
|
| 189 |
+
outputs=negative_prompt,
|
| 190 |
+
api_name=False,
|
| 191 |
)
|
| 192 |
|
| 193 |
gr.on(
|