Spaces:
Runtime error
Runtime error
shamikbose89
commited on
Commit
•
0e33439
1
Parent(s):
5abb977
Update app.py
Browse files
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):.
|
23 |
elif power > 9:
|
24 |
-
size_human_readable = f"{(size/10**9):.
|
25 |
elif power > 6:
|
26 |
-
size_human_readable = f"{(size/10**6):.
|
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
|