shamikbose89 commited on
Commit
0e33439
1 Parent(s): 5abb977

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -19,11 +19,11 @@ def int_to_string(size: int, precision=2):
19
  power = math.ceil(math.log10(size))
20
  size_human_readable = ""
21
  if power > 12:
22
- size_human_readable = f"{(size/10**12):.2} Trillion"
23
  elif power > 9:
24
- size_human_readable = f"{(size/10**9):.2} Billion"
25
  elif power > 6:
26
- size_human_readable = f"{(size/10**6):.2} Million"
27
  else:
28
  size_human_readable = str(size)
29
  return size_human_readable
 
19
  power = math.ceil(math.log10(size))
20
  size_human_readable = ""
21
  if power > 12:
22
+ size_human_readable = f"{(size/10**12):.3} Trillion"
23
  elif power > 9:
24
+ size_human_readable = f"{(size/10**9):.3} Billion"
25
  elif power > 6:
26
+ size_human_readable = f"{(size/10**6):.3} Million"
27
  else:
28
  size_human_readable = str(size)
29
  return size_human_readable