merve HF staff commited on
Commit
0a06daa
1 Parent(s): 230e159
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -18,8 +18,6 @@ def infer(img):
18
  image = img["background"].convert("RGB")
19
  point_prompt = img["layers"][0]
20
  total_image = img["composite"]
21
- #torch_img = torch.from_numpy(np.array(image))
22
- #torch_img = torch_img.permute(2, 0, 1)
23
  predictor.set_image(np.array(image))
24
 
25
  # get point prompt
@@ -51,6 +49,6 @@ with gr.Blocks() as demo:
51
  )
52
  submit_btn = gr.Button()
53
  output = gr.AnnotatedImage()
54
- submit_btn.click(infer, inputs=im, outputs=gr.AnnotatedImage())
55
 
56
  demo.launch(debug=True)
 
18
  image = img["background"].convert("RGB")
19
  point_prompt = img["layers"][0]
20
  total_image = img["composite"]
 
 
21
  predictor.set_image(np.array(image))
22
 
23
  # get point prompt
 
49
  )
50
  submit_btn = gr.Button()
51
  output = gr.AnnotatedImage()
52
+ submit_btn.click(infer, inputs=im, outputs=output)
53
 
54
  demo.launch(debug=True)