Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -105,8 +105,6 @@ async def predict(model_name: str, file: UploadFile = File(...)):
|
|
105 |
try:
|
106 |
contents = await file.read()
|
107 |
image = Image.open(BytesIO(contents)).convert('RGB')
|
108 |
-
# Verify it's an image by attempting to process it
|
109 |
-
image.verify()
|
110 |
# Reset file pointer
|
111 |
await file.seek(0)
|
112 |
except Exception:
|
|
|
105 |
try:
|
106 |
contents = await file.read()
|
107 |
image = Image.open(BytesIO(contents)).convert('RGB')
|
|
|
|
|
108 |
# Reset file pointer
|
109 |
await file.seek(0)
|
110 |
except Exception:
|