Spaces:
Sleeping
Sleeping
CK-Explorer
commited on
Commit
·
f8849a8
1
Parent(s):
37bd665
fix: correct the divider for the memory, and check for the available memory
Browse files- ui/utils.py +6 -1
ui/utils.py
CHANGED
|
@@ -50,7 +50,12 @@ def _print_RAM_status() -> None:
|
|
| 50 |
Print the current status of system RAM.
|
| 51 |
"""
|
| 52 |
mem = psutil.virtual_memory()
|
|
|
|
| 53 |
print(
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
)
|
| 56 |
|
|
|
|
| 50 |
Print the current status of system RAM.
|
| 51 |
"""
|
| 52 |
mem = psutil.virtual_memory()
|
| 53 |
+
gib = 1024 ** 3
|
| 54 |
print(
|
| 55 |
+
(
|
| 56 |
+
"[Info] System RAM: "
|
| 57 |
+
f"Available {mem.available/gib:.2f} GB, "
|
| 58 |
+
f"{mem.used / gib:.2f} / {mem.total / gib:.2f} GB ({mem.percent}%)"
|
| 59 |
+
)
|
| 60 |
)
|
| 61 |
|