Spaces:
Sleeping
Sleeping
chips
commited on
Commit
·
e5748f0
1
Parent(s):
99c30e3
bytes issue
Browse files
app.py
CHANGED
|
@@ -277,7 +277,7 @@ async def make_versions(input_image_url: str, num_images: int):
|
|
| 277 |
|
| 278 |
def get_file_extension(filedata):
|
| 279 |
try:
|
| 280 |
-
img = Image.open(
|
| 281 |
return img.format.lower()
|
| 282 |
except Exception as e:
|
| 283 |
print(f"Error getting file extension: {e}")
|
|
|
|
| 277 |
|
| 278 |
def get_file_extension(filedata):
|
| 279 |
try:
|
| 280 |
+
img = Image.open(BytesIO(filedata))
|
| 281 |
return img.format.lower()
|
| 282 |
except Exception as e:
|
| 283 |
print(f"Error getting file extension: {e}")
|