Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,6 +40,7 @@ def inference(input_img, num_inference_steps, guidance_scale, seed ):
|
|
| 40 |
return result
|
| 41 |
|
| 42 |
def remove_background(result):
|
|
|
|
| 43 |
result = rembg.remove(result)
|
| 44 |
return result
|
| 45 |
|
|
@@ -61,7 +62,7 @@ with gr.Blocks() as demo:
|
|
| 61 |
btn = gr.Button('Submit')
|
| 62 |
|
| 63 |
btn.click(inference, [input_img, num_inference_steps, guidance_scale, seed ], output_img)
|
| 64 |
-
rm_in_bkg.input(remove_background, input_img,
|
| 65 |
rm_out_bkg.input(remove_background, output_img, output_img)
|
| 66 |
|
| 67 |
gr.Examples(
|
|
|
|
| 40 |
return result
|
| 41 |
|
| 42 |
def remove_background(result):
|
| 43 |
+
result = Image.open(result)
|
| 44 |
result = rembg.remove(result)
|
| 45 |
return result
|
| 46 |
|
|
|
|
| 62 |
btn = gr.Button('Submit')
|
| 63 |
|
| 64 |
btn.click(inference, [input_img, num_inference_steps, guidance_scale, seed ], output_img)
|
| 65 |
+
rm_in_bkg.input(remove_background, input_img, input_img)
|
| 66 |
rm_out_bkg.input(remove_background, output_img, output_img)
|
| 67 |
|
| 68 |
gr.Examples(
|