Update app.py
Browse files
app.py
CHANGED
@@ -29,9 +29,15 @@ def txt2img(prompt):
|
|
29 |
image=pipe(prompt=prompt, num_inference_steps=3, guidance_scale=0.0).images[0]
|
30 |
return image
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
title="SDXL Turbo Inpainting CPU"
|
33 |
description="Inpainting with SDXL Turbo <br><br> <b>Please use square .png image as input, 512x512, 768x768, or 1024x1024</b>"
|
34 |
-
gr.Interface(
|
35 |
gr.Textbox(label='What you want the AI to Generate, 77 Token limit'),
|
36 |
gr.Slider(minimum=.5, maximum=1, value=.75, step=.025, label='Strength')],
|
37 |
outputs='image',
|
|
|
29 |
image=pipe(prompt=prompt, num_inference_steps=3, guidance_scale=0.0).images[0]
|
30 |
return image
|
31 |
|
32 |
+
def demo(prompt):
|
33 |
+
with gr.Tab("Img2Img"):
|
34 |
+
img2img(prompt)
|
35 |
+
with gr.Tab("Txt2Img"):
|
36 |
+
txt2img(prompt)
|
37 |
+
return image
|
38 |
title="SDXL Turbo Inpainting CPU"
|
39 |
description="Inpainting with SDXL Turbo <br><br> <b>Please use square .png image as input, 512x512, 768x768, or 1024x1024</b>"
|
40 |
+
gr.Interface(fn=demo, inputs=[gr.Image(source="upload", tool="sketch", label="Source Image"),
|
41 |
gr.Textbox(label='What you want the AI to Generate, 77 Token limit'),
|
42 |
gr.Slider(minimum=.5, maximum=1, value=.75, step=.025, label='Strength')],
|
43 |
outputs='image',
|