Spaces:
Runtime error
Runtime error
shamikbose89
commited on
Commit
•
5abb977
1
Parent(s):
8b85a6c
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def string_to_int(size_str: str):
|
|
16 |
return size * mappings[suffix]
|
17 |
|
18 |
def int_to_string(size: int, precision=2):
|
19 |
-
power = math.ceil(math.
|
20 |
size_human_readable = ""
|
21 |
if power > 12:
|
22 |
size_human_readable = f"{(size/10**12):.2} Trillion"
|
|
|
16 |
return size * mappings[suffix]
|
17 |
|
18 |
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"
|