attendantelectro commited on
Commit
bda1f27
·
verified ·
1 Parent(s): 2e2a44b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -7
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(file_path):
44
- file_siz = file_path / (1024 * 1024)
45
- return file_siz
46
 
47
- def Percentage(file1,file2):
48
- f = filig(file1) - filig(file2)
49
- g = int((f / filig(file1)) * 100)
50
- return str(g) + "%"
 
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) + "%"