Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def resize(height,img):
|
|
29 |
img = img.resize((wsize,baseheight), Image.Resampling.LANCZOS)
|
30 |
return img
|
31 |
|
32 |
-
def predict(source_img):
|
33 |
imageio.imwrite("data.png", source_img["image"])
|
34 |
imageio.imwrite("data_mask.png", source_img["mask"])
|
35 |
|
@@ -50,4 +50,4 @@ def predict(source_img):
|
|
50 |
|
51 |
custom_css="style.css"
|
52 |
|
53 |
-
gr.Interface(fn=predict, inputs=source_img, outputs=gallery, css=custom_css).launch(enable_queue=True)
|
|
|
29 |
img = img.resize((wsize,baseheight), Image.Resampling.LANCZOS)
|
30 |
return img
|
31 |
|
32 |
+
def predict(prompt, source_img):
|
33 |
imageio.imwrite("data.png", source_img["image"])
|
34 |
imageio.imwrite("data_mask.png", source_img["mask"])
|
35 |
|
|
|
50 |
|
51 |
custom_css="style.css"
|
52 |
|
53 |
+
gr.Interface(fn=predict, inputs=["text", source_img], outputs=gallery, css=custom_css).launch(enable_queue=True)
|