Update app.py
Browse files
app.py
CHANGED
@@ -161,13 +161,7 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
|
|
161 |
"steps": steps,
|
162 |
"cfg_scale": cfg_scale,
|
163 |
"seed": seed if seed != -1 else random.randint(1, 1000000000),
|
164 |
-
"strength": strength
|
165 |
-
"width": width,
|
166 |
-
"height": height,
|
167 |
-
"guidance_scale": cfg_scale,
|
168 |
-
"num_inference_steps": steps,
|
169 |
-
"resolution": f"{width} x {height}",
|
170 |
-
"negative_prompt": is_negative
|
171 |
}
|
172 |
|
173 |
response = requests.post(API_URL, headers=headers, json=payload, timeout=timeout)
|
@@ -220,11 +214,6 @@ with gr.Blocks (theme=gr.themes.Default(primary_hue="pink", secondary_hue="pink"
|
|
220 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1)
|
221 |
# with gr.Row():
|
222 |
# gpt = gr.Checkbox(label="ChatGPT")
|
223 |
-
|
224 |
-
with gr.Tab("Size"):
|
225 |
-
with gr.Row():
|
226 |
-
width = gr.Slider(label="Width", minimum=15, maximum=2000, value=1024, step=1)
|
227 |
-
height = gr.Slider(label="Height", minimum=15, maximum=2000, value=1024, step=1)
|
228 |
|
229 |
with gr.Tab("Information"):
|
230 |
with gr.Row():
|
@@ -273,6 +262,6 @@ with gr.Blocks (theme=gr.themes.Default(primary_hue="pink", secondary_hue="pink"
|
|
273 |
with gr.Row():
|
274 |
image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
|
275 |
|
276 |
-
text_button.click(query, inputs=[text_prompt, model, negative_prompt, steps, cfg, method, seed, strength
|
277 |
|
278 |
dalle.launch(show_api=False, share=False)
|
|
|
161 |
"steps": steps,
|
162 |
"cfg_scale": cfg_scale,
|
163 |
"seed": seed if seed != -1 else random.randint(1, 1000000000),
|
164 |
+
"strength": strength
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
|
167 |
response = requests.post(API_URL, headers=headers, json=payload, timeout=timeout)
|
|
|
214 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1)
|
215 |
# with gr.Row():
|
216 |
# gpt = gr.Checkbox(label="ChatGPT")
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
with gr.Tab("Information"):
|
219 |
with gr.Row():
|
|
|
262 |
with gr.Row():
|
263 |
image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
|
264 |
|
265 |
+
text_button.click(query, inputs=[text_prompt, model, negative_prompt, steps, cfg, method, seed, strength], outputs=image_output)
|
266 |
|
267 |
dalle.launch(show_api=False, share=False)
|