Spaces:
Runtime error
Runtime error
Commit
·
ae7d1dc
1
Parent(s):
5005e7e
Update app.py
Browse files
app.py
CHANGED
@@ -122,7 +122,7 @@ def get_data(text):
|
|
122 |
|
123 |
def send_to_img2img_def(image):
|
124 |
result = Image.open(image)
|
125 |
-
return
|
126 |
|
127 |
def send_to_txt2img(image):
|
128 |
|
@@ -175,7 +175,7 @@ def txt2img(prompt, negative_prompt, model, steps, sampler, cfg_scale, width, he
|
|
175 |
|
176 |
job = prodia_client.wait(result)
|
177 |
|
178 |
-
return
|
179 |
|
180 |
|
181 |
def img2img(input_image, denoising, prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed):
|
@@ -195,7 +195,7 @@ def img2img(input_image, denoising, prompt, negative_prompt, model, steps, sampl
|
|
195 |
|
196 |
job = prodia_client.wait(result)
|
197 |
|
198 |
-
return
|
199 |
|
200 |
|
201 |
css = """
|
@@ -244,7 +244,7 @@ with gr.Blocks(css=css) as demo:
|
|
244 |
seed = gr.Number(label="Seed", value=-1)
|
245 |
|
246 |
with gr.Column(scale=2):
|
247 |
-
image_output = gr.
|
248 |
send_to_img2img = gr.Button(value="Send to img2img")
|
249 |
|
250 |
|
@@ -286,7 +286,7 @@ with gr.Blocks(css=css) as demo:
|
|
286 |
i2i_seed = gr.Number(label="Seed", value=-1)
|
287 |
|
288 |
with gr.Column(scale=2):
|
289 |
-
i2i_image_output = gr.
|
290 |
|
291 |
i2i_text_button.click(img2img, inputs=[i2i_image_input, i2i_denoising, i2i_prompt, i2i_negative_prompt,
|
292 |
model, i2i_steps, i2i_sampler, i2i_cfg_scale, i2i_width, i2i_height,
|
|
|
122 |
|
123 |
def send_to_img2img_def(image):
|
124 |
result = Image.open(image)
|
125 |
+
return result
|
126 |
|
127 |
def send_to_txt2img(image):
|
128 |
|
|
|
175 |
|
176 |
job = prodia_client.wait(result)
|
177 |
|
178 |
+
return job["imageUrl"]
|
179 |
|
180 |
|
181 |
def img2img(input_image, denoising, prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed):
|
|
|
195 |
|
196 |
job = prodia_client.wait(result)
|
197 |
|
198 |
+
return job["imageUrl"]
|
199 |
|
200 |
|
201 |
css = """
|
|
|
244 |
seed = gr.Number(label="Seed", value=-1)
|
245 |
|
246 |
with gr.Column(scale=2):
|
247 |
+
image_output = gr.Image(show_label=False)
|
248 |
send_to_img2img = gr.Button(value="Send to img2img")
|
249 |
|
250 |
|
|
|
286 |
i2i_seed = gr.Number(label="Seed", value=-1)
|
287 |
|
288 |
with gr.Column(scale=2):
|
289 |
+
i2i_image_output = gr.Image(show_label=False)
|
290 |
|
291 |
i2i_text_button.click(img2img, inputs=[i2i_image_input, i2i_denoising, i2i_prompt, i2i_negative_prompt,
|
292 |
model, i2i_steps, i2i_sampler, i2i_cfg_scale, i2i_width, i2i_height,
|