Spaces:
Running
Running
Update predict.py
Browse files- predict.py +1 -1
predict.py
CHANGED
@@ -26,6 +26,6 @@ async def detect(image: UploadFile = File(...)):
|
|
26 |
image = cv2.imdecode(image, cv2.IMREAD_COLOR)
|
27 |
wound_boxes = detect_wounds(image)
|
28 |
image_with_boxes = draw_boxes(image, wound_boxes)
|
29 |
-
result_path = '
|
30 |
cv2.imwrite(result_path, image_with_boxes)
|
31 |
return FileResponse(result_path, media_type='image/jpeg')
|
|
|
26 |
image = cv2.imdecode(image, cv2.IMREAD_COLOR)
|
27 |
wound_boxes = detect_wounds(image)
|
28 |
image_with_boxes = draw_boxes(image, wound_boxes)
|
29 |
+
result_path = 'result.jpg'
|
30 |
cv2.imwrite(result_path, image_with_boxes)
|
31 |
return FileResponse(result_path, media_type='image/jpeg')
|