yuragoithf
commited on
Commit
•
f33344b
1
Parent(s):
8d44ae5
Update app.py
Browse files
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 |
-
|
41 |
-
|
42 |
-
|
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()
|
|