Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -198,7 +198,7 @@ def predict():
|
|
| 198 |
"""
|
| 199 |
Accepts:
|
| 200 |
- multipart/form-data with file field "file"
|
| 201 |
-
- or JSON {"image": "<data:url...>", "conf": 0.
|
| 202 |
Returns JSON:
|
| 203 |
{"annotated": "<data:image/png;base64,...>", "confidences": [..], "count": N}
|
| 204 |
"""
|
|
@@ -215,7 +215,7 @@ def predict():
|
|
| 215 |
|
| 216 |
# Parse input
|
| 217 |
img: Optional[Image.Image] = None
|
| 218 |
-
conf_threshold = 0.
|
| 219 |
|
| 220 |
# Check if file uploaded
|
| 221 |
if "file" in request.files:
|
|
|
|
| 198 |
"""
|
| 199 |
Accepts:
|
| 200 |
- multipart/form-data with file field "file"
|
| 201 |
+
- or JSON {"image": "<data:url...>", "conf": 0.05}
|
| 202 |
Returns JSON:
|
| 203 |
{"annotated": "<data:image/png;base64,...>", "confidences": [..], "count": N}
|
| 204 |
"""
|
|
|
|
| 215 |
|
| 216 |
# Parse input
|
| 217 |
img: Optional[Image.Image] = None
|
| 218 |
+
conf_threshold = 0.05
|
| 219 |
|
| 220 |
# Check if file uploaded
|
| 221 |
if "file" in request.files:
|