Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,11 +9,11 @@ import tempfile
|
|
9 |
supported_formats = ['avi', 'mp4', 'mov', 'mkv', 'flv', 'wmv', 'webm', 'mpeg', 'mpg', '3gp']
|
10 |
audio_formats = ['mp3', 'wav', 'aac', 'flac']
|
11 |
gif_formats = ['gif']
|
12 |
-
image_formats = sorted(
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
|
18 |
def sanitize_filename(filename):
|
19 |
"""Sanitize filename by removing special characters and spaces."""
|
|
|
9 |
supported_formats = ['avi', 'mp4', 'mov', 'mkv', 'flv', 'wmv', 'webm', 'mpeg', 'mpg', '3gp']
|
10 |
audio_formats = ['mp3', 'wav', 'aac', 'flac']
|
11 |
gif_formats = ['gif']
|
12 |
+
image_formats = sorted(Image.SAVE.keys()) or ['BLP', 'BMP', 'BUFR', 'DDS', 'DIB', 'EPS',
|
13 |
+
'GIF', 'GRIB', 'HDF5', 'ICNS', 'ICO', 'IM',
|
14 |
+
'JPEG', 'JPEG2000', 'MPO', 'MSP', 'PALM', 'PCX',
|
15 |
+
'PDF', 'PNG', 'PPM', 'SGI', 'SPIDER', 'TGA', 'TIFF',
|
16 |
+
'WEBP', 'WMX', 'XBM']
|
17 |
|
18 |
def sanitize_filename(filename):
|
19 |
"""Sanitize filename by removing special characters and spaces."""
|