Update app.py
Browse files
app.py
CHANGED
@@ -55,8 +55,8 @@ def roboflow(image, confidence, overlap, stroke_width=1, labels=False):
|
|
55 |
Send the image to Roboflow API for inference.
|
56 |
Returns JSON and image with bounding boxes drawn on to it.
|
57 |
'''
|
58 |
-
json_url = f"https://detect.roboflow.com/sku-110k/2?api_key=
|
59 |
-
image_url = f"https://detect.roboflow.com/sku-110k/2?api_key=
|
60 |
|
61 |
encoded_image = encode_image(image)
|
62 |
headers = {"Content-Type": "application/x-www-form-urlencoded"}
|
|
|
55 |
Send the image to Roboflow API for inference.
|
56 |
Returns JSON and image with bounding boxes drawn on to it.
|
57 |
'''
|
58 |
+
json_url = f"https://detect.roboflow.com/sku-110k/2?api_key=MjzjT2w8u8tlxjmUYDAd&confidence={confidence}&overlap={overlap}&format=json"
|
59 |
+
image_url = f"https://detect.roboflow.com/sku-110k/2?api_key=MjzjT2w8u8tlxjmUYDAd&confidence={confidence}&overlap={overlap}&format=image&labels={str(labels).lower()}&stroke={stroke_width}"
|
60 |
|
61 |
encoded_image = encode_image(image)
|
62 |
headers = {"Content-Type": "application/x-www-form-urlencoded"}
|