Spaces:
Running
on
Zero
Running
on
Zero
Jagrut Thakare
commited on
Commit
·
274b9fb
1
Parent(s):
d2700a6
v1.7
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import spaces
|
|
10 |
login(os.getenv("HF_TOKEN"))
|
11 |
|
12 |
@spaces.GPU()
|
13 |
-
def process_image(image):
|
14 |
output = process_inpaint(image["background"], image["layers"][0])
|
15 |
img_output = Image.fromarray(output).convert("RGB")
|
16 |
return img_output
|
@@ -24,6 +24,6 @@ with gr.Blocks() as demo:
|
|
24 |
button = gr.Button("Remove")
|
25 |
with gr.Column():
|
26 |
output = gr.Image(format="png", label="Output Image")
|
27 |
-
button.click(process_image, inputs=[image], outputs=[output])
|
28 |
|
29 |
-
demo.launch()
|
|
|
10 |
login(os.getenv("HF_TOKEN"))
|
11 |
|
12 |
@spaces.GPU()
|
13 |
+
def process_image(image, progress=gr.Progress(track_tqdm=True)):
|
14 |
output = process_inpaint(image["background"], image["layers"][0])
|
15 |
img_output = Image.fromarray(output).convert("RGB")
|
16 |
return img_output
|
|
|
24 |
button = gr.Button("Remove")
|
25 |
with gr.Column():
|
26 |
output = gr.Image(format="png", label="Output Image")
|
27 |
+
button.click(fn=process_image, inputs=[image], outputs=[output])
|
28 |
|
29 |
+
demo.launch(debug=True)
|