Spaces:
Running
Running
Commit ·
8f7c632
1
Parent(s): 2b762ad
Atualizar método detecção
Browse files
app.py
CHANGED
|
@@ -34,9 +34,7 @@ def health_check():
|
|
| 34 |
async def detect(file: UploadFile = File(...)):
|
| 35 |
try:
|
| 36 |
content = await file.read()
|
| 37 |
-
|
| 38 |
-
img = cv2.imdecode(nparr, cv2.IMREAD_COLOR)
|
| 39 |
-
result = detector.detect_image_cv(img)
|
| 40 |
return JSONResponse(content=result)
|
| 41 |
except Exception as e:
|
| 42 |
return JSONResponse(status_code=500, content={"error": str(e)})
|
|
|
|
| 34 |
async def detect(file: UploadFile = File(...)):
|
| 35 |
try:
|
| 36 |
content = await file.read()
|
| 37 |
+
result = detector.detect_image(content)
|
|
|
|
|
|
|
| 38 |
return JSONResponse(content=result)
|
| 39 |
except Exception as e:
|
| 40 |
return JSONResponse(status_code=500, content={"error": str(e)})
|