Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -160,8 +160,8 @@ def predict(radio, dict, word_mask, prompt=""):
|
|
160 |
mask = Image.fromarray(np.uint8(bw_image)).convert('RGB')
|
161 |
os.remove(filename)
|
162 |
with autocast(device): #"cuda"
|
163 |
-
|
164 |
-
|
165 |
|
166 |
# examples = [[dict(image="init_image.png", mask="mask_image.png"), "A panda sitting on a bench"]]
|
167 |
css = '''
|
|
|
160 |
mask = Image.fromarray(np.uint8(bw_image)).convert('RGB')
|
161 |
os.remove(filename)
|
162 |
with autocast(device): #"cuda"
|
163 |
+
images = pipe(prompt = prompt, init_image=init_image, mask_image=mask, strength=0.8)["sample"]
|
164 |
+
return images[0]
|
165 |
|
166 |
# examples = [[dict(image="init_image.png", mask="mask_image.png"), "A panda sitting on a bench"]]
|
167 |
css = '''
|