TaiYouWeb commited on
Commit
03840d4
·
verified ·
1 Parent(s): fae982e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -83,7 +83,7 @@ def torch_update_gpu_status():
83
  free_memory=gpu_memory[0] /(1024 *1024)
84
  used_memory = (gpu_memory[1] - gpu_memory[0]) / (1024 * 1024)
85
 
86
- gpu_status = f"**GPU**: {gpu_info}\n**Free Memory**:{free_memory}MB\n**Total Memory**: {total_memory:.2f} MB\n**Used Memory**: {used_memory:.2f} MB\n"
87
  else:
88
  gpu_status = "No GPU available"
89
  return gpu_status
@@ -94,7 +94,7 @@ def update_cpu_status():
94
  time_str = current_time.strftime("%Y-%m-%d %H:%M:%S")
95
 
96
  cpu_percent = psutil.cpu_percent()
97
- cpu_status = f"{time_str}(UTC+0)\n**CPU Usage**: {cpu_percent}%\n"
98
  return cpu_status
99
 
100
  def update_status():
 
83
  free_memory=gpu_memory[0] /(1024 *1024)
84
  used_memory = (gpu_memory[1] - gpu_memory[0]) / (1024 * 1024)
85
 
86
+ gpu_status = f"**GPU**: {gpu_info}\n**Free Memory**: {free_memory}MB\n**Total Memory**: {total_memory:.2f} MB\n**Used Memory**: {used_memory:.2f} MB\n"
87
  else:
88
  gpu_status = "No GPU available"
89
  return gpu_status
 
94
  time_str = current_time.strftime("%Y-%m-%d %H:%M:%S")
95
 
96
  cpu_percent = psutil.cpu_percent()
97
+ cpu_status = f"**{time_str} (UTC+0)**\n**CPU Usage**: {cpu_percent}%\n"
98
  return cpu_status
99
 
100
  def update_status():