Spaces:
Sleeping
Sleeping
rollback image format
Browse files
app.py
CHANGED
|
@@ -249,7 +249,7 @@ async def upload_image(
|
|
| 249 |
city: str = Form(...)
|
| 250 |
):
|
| 251 |
image_data = await file.read()
|
| 252 |
-
with tempfile.NamedTemporaryFile(delete=False, suffix=".
|
| 253 |
temp_image_file.write(image_data)
|
| 254 |
temp_path = temp_image_file.name
|
| 255 |
results = model(temp_path, device='cpu')
|
|
|
|
| 249 |
city: str = Form(...)
|
| 250 |
):
|
| 251 |
image_data = await file.read()
|
| 252 |
+
with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as temp_image_file:
|
| 253 |
temp_image_file.write(image_data)
|
| 254 |
temp_path = temp_image_file.name
|
| 255 |
results = model(temp_path, device='cpu')
|