Spaces:
Runtime error
Runtime error
Soham Chandratre
commited on
Commit
·
c9fb15b
1
Parent(s):
3c93956
minor changes
Browse files- routes/route.py +5 -5
routes/route.py
CHANGED
|
@@ -264,11 +264,11 @@ async def verify_pothole(potholeModel: PotholeModel, token: HTTPAuthorizationCre
|
|
| 264 |
# Pass image bytes to your model function
|
| 265 |
results = load_image_model(image_bytes)
|
| 266 |
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
return JSONResponse(content={"response": "Pothole"})
|
| 272 |
except Exception as e:
|
| 273 |
return JSONResponse(content={"response": f"{e}"})
|
| 274 |
|
|
|
|
| 264 |
# Pass image bytes to your model function
|
| 265 |
results = load_image_model(image_bytes)
|
| 266 |
|
| 267 |
+
if results == 1:
|
| 268 |
+
return JSONResponse(content={"response": "Pothole"})
|
| 269 |
+
else:
|
| 270 |
+
return JSONResponse(content={"response": "notPothole"})
|
| 271 |
+
# return JSONResponse(content={"response": "Pothole"})
|
| 272 |
except Exception as e:
|
| 273 |
return JSONResponse(content={"response": f"{e}"})
|
| 274 |
|