Update app.py
Browse files
app.py
CHANGED
|
@@ -13,8 +13,8 @@ def get_stats():
|
|
| 13 |
ram = process.memory_info().rss / 1024 ** 3
|
| 14 |
disk_tmp = psutil.disk_usage('/tmp').used / 1024 ** 3
|
| 15 |
disk_data = psutil.disk_usage('/data').used / 1024 ** 3
|
| 16 |
-
cpu = psutil.cpu_percent(interval=1)
|
| 17 |
-
return f"RAM: {ram:.2f} GB | /tmp: {disk_tmp:.2f} GB | /data: {disk_data:.2f} GB | CPU: {cpu
|
| 18 |
|
| 19 |
def chat(message, history):
|
| 20 |
messages = []
|
|
|
|
| 13 |
ram = process.memory_info().rss / 1024 ** 3
|
| 14 |
disk_tmp = psutil.disk_usage('/tmp').used / 1024 ** 3
|
| 15 |
disk_data = psutil.disk_usage('/data').used / 1024 ** 3
|
| 16 |
+
cpu = psutil.cpu_percent(interval=1, percpu=True)
|
| 17 |
+
return f"RAM: {ram:.2f} GB | /tmp: {disk_tmp:.2f} GB | /data: {disk_data:.2f} GB | CPU: {cpu}%"
|
| 18 |
|
| 19 |
def chat(message, history):
|
| 20 |
messages = []
|