Spaces:
Running
Running
change exception
Browse files
main.py
CHANGED
@@ -145,7 +145,7 @@ async def classify_image(file: UploadFile = File(None)):
|
|
145 |
|
146 |
return FileImageDetectionResponse(**response_data)
|
147 |
|
148 |
-
except
|
149 |
logging.error("Error processing image: %s", str(e))
|
150 |
raise HTTPException(
|
151 |
status_code=500, detail=f"Error processing image: {str(e)}"
|
@@ -227,7 +227,7 @@ async def classify_images(request: ImageUrlsRequest):
|
|
227 |
|
228 |
response_data.append(detection_result)
|
229 |
|
230 |
-
except
|
231 |
logging.error("Error processing image from %s: %s", image_url, str(e))
|
232 |
raise HTTPException(
|
233 |
status_code=500,
|
|
|
145 |
|
146 |
return FileImageDetectionResponse(**response_data)
|
147 |
|
148 |
+
except Exception as e:
|
149 |
logging.error("Error processing image: %s", str(e))
|
150 |
raise HTTPException(
|
151 |
status_code=500, detail=f"Error processing image: {str(e)}"
|
|
|
227 |
|
228 |
response_data.append(detection_result)
|
229 |
|
230 |
+
except Exception as e:
|
231 |
logging.error("Error processing image from %s: %s", image_url, str(e))
|
232 |
raise HTTPException(
|
233 |
status_code=500,
|