Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ def resize(value,img):
|
|
| 36 |
return img
|
| 37 |
|
| 38 |
|
| 39 |
-
def infer(
|
| 40 |
|
| 41 |
source_image = resize(512, source_img)
|
| 42 |
source_image.save('source.png')
|
|
@@ -55,4 +55,4 @@ print("Great sylvain ! Everything is working fine !")
|
|
| 55 |
title="Img2Img Stable Diffusion CPU"
|
| 56 |
description="Img2Img Stable Diffusion example using CPU and HF token. <br />Warning: Slow process... ~5/10 min inference time. <b>NSFW filter enabled.</b>"
|
| 57 |
|
| 58 |
-
gr.Interface(fn=infer, inputs=["text"
|
|
|
|
| 36 |
return img
|
| 37 |
|
| 38 |
|
| 39 |
+
def infer(source_img, prompt):
|
| 40 |
|
| 41 |
source_image = resize(512, source_img)
|
| 42 |
source_image.save('source.png')
|
|
|
|
| 55 |
title="Img2Img Stable Diffusion CPU"
|
| 56 |
description="Img2Img Stable Diffusion example using CPU and HF token. <br />Warning: Slow process... ~5/10 min inference time. <b>NSFW filter enabled.</b>"
|
| 57 |
|
| 58 |
+
gr.Interface(fn=infer, inputs=[source_img, "text"], outputs=gallery,title=title,description=description).queue(max_size=100).launch(enable_queue=True)
|