Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -143,26 +143,33 @@ css = """
|
|
143 |
|
144 |
|
145 |
with gr.Blocks(css=css) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
with gr.Column(elem_id="col-container"):
|
147 |
with gr.Row():
|
148 |
gr.Markdown("HINT: Use smaller image size for testing, will consume less of your free GPU time!")
|
149 |
|
150 |
with gr.Row():
|
151 |
-
gr.Examples(examples=examples, inputs=[prompt], outputs=[result,
|
152 |
|
153 |
with gr.Row():
|
154 |
-
prompt
|
155 |
-
label="Prompt",
|
156 |
-
show_label=False,
|
157 |
-
placeholder="Enter your prompt",
|
158 |
-
container=False,
|
159 |
-
)
|
160 |
|
161 |
with gr.Row():
|
162 |
run_button = gr.Button("Generate", scale=0, variant="primary")
|
163 |
|
164 |
-
result
|
165 |
-
seed_output
|
166 |
|
167 |
with gr.Accordion("Advanced Settings", open=False):
|
168 |
negative_prompt = gr.Text(
|
|
|
143 |
|
144 |
|
145 |
with gr.Blocks(css=css) as demo:
|
146 |
+
|
147 |
+
prompt = gr.Text(
|
148 |
+
label="Prompt",
|
149 |
+
show_label=False,
|
150 |
+
placeholder="Enter your prompt",
|
151 |
+
container=False,
|
152 |
+
render=False,
|
153 |
+
)
|
154 |
+
|
155 |
+
result = gr.Image(label="Result", render=False)
|
156 |
+
seed_output = gr.Textbox(label="Used seed", lines=1, render=False)
|
157 |
+
|
158 |
with gr.Column(elem_id="col-container"):
|
159 |
with gr.Row():
|
160 |
gr.Markdown("HINT: Use smaller image size for testing, will consume less of your free GPU time!")
|
161 |
|
162 |
with gr.Row():
|
163 |
+
gr.Examples(examples=examples, inputs=[prompt], outputs=[result, seed_output], fn=infer, examples_per_page=25, cache_examples=False, cache_mode="lazy")
|
164 |
|
165 |
with gr.Row():
|
166 |
+
prompt.render()
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
with gr.Row():
|
169 |
run_button = gr.Button("Generate", scale=0, variant="primary")
|
170 |
|
171 |
+
result.render()
|
172 |
+
seed_output.render()
|
173 |
|
174 |
with gr.Accordion("Advanced Settings", open=False):
|
175 |
negative_prompt = gr.Text(
|