yuragoithf commited on
Commit
f33344b
1 Parent(s): 8d44ae5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -29,15 +29,9 @@ def rb(img):
29
 
30
  # response = requests.post(API_URL, headers=headers, data=bytes(img.tobytes("raw")))
31
  response = requests.post(API_URL, headers=headers, data=img_byte_arr)
32
- logits = response.score
33
- # bboxes = response.pred_boxes
34
- # masks = response.pred_masks
35
  return response.json()
36
 
37
- # train = os.listdir("./")
38
- # print(train)
39
 
40
- # inputs = gr.inputs.Image(type="pil", label="Upload an image")
41
- # demo = gr.Interface(fn=rb, inputs=inputs, outputs="json")
42
- # demo.launch()
43
- gr.Interface.load("spaces/eugenesiow/remove-bg").launch();
 
29
 
30
  # response = requests.post(API_URL, headers=headers, data=bytes(img.tobytes("raw")))
31
  response = requests.post(API_URL, headers=headers, data=img_byte_arr)
 
 
 
32
  return response.json()
33
 
 
 
34
 
35
+ inputs = gr.inputs.Image(type="pil", label="Upload an image")
36
+ demo = gr.Interface(fn=rb, inputs=inputs, outputs=["image", "json"])
37
+ demo.launch()