Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -40,11 +40,10 @@ def convert_images_to_webp(image_paths):
|
|
| 40 |
except Exception as e:
|
| 41 |
print(f'Error converting {image_path}: {e}')
|
| 42 |
|
| 43 |
-
def filig(
|
| 44 |
-
|
| 45 |
-
return file_siz
|
| 46 |
|
| 47 |
-
def Percentage(file1,file2):
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
| 40 |
except Exception as e:
|
| 41 |
print(f'Error converting {image_path}: {e}')
|
| 42 |
|
| 43 |
+
def filig(file_size):
|
| 44 |
+
return file_size / (1024 * 1024)
|
|
|
|
| 45 |
|
| 46 |
+
def Percentage(file1, file2):
|
| 47 |
+
f = filig(file1) - filig(file2)
|
| 48 |
+
g = int((f / filig(file1)) * 100)
|
| 49 |
+
return str(g) + "%"
|