ldhldh commited on
Commit
3f81af5
·
1 Parent(s): d1d8ae0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -89,7 +89,7 @@ print(sample_data)
89
  user_num = len(sample_data['gpus'])
90
 
91
  total_gpu = sample_data['total']['total']
92
- used_gpu = sample_data['total']['used']
93
  timestamp_list = []
94
 
95
 
@@ -127,7 +127,7 @@ col1, col2, col3 = st.columns(3)
127
  col1.metric("Total GPU", f"{total_gpu} GB", f"{user_num} users are sharing now")
128
  if total_gpu != 0:
129
  col2.metric("Used", f"{used_gpu} GB")
130
- col3.metric("Percent", f"{min(round(100 * used_gpu/total_gpu, 2),total_gpu*0.87)} %",)
131
  else:
132
  col2.metric("Used", f"0 GB")
133
  col3.metric("Percent", f"- %",)
 
89
  user_num = len(sample_data['gpus'])
90
 
91
  total_gpu = sample_data['total']['total']
92
+ used_gpu = min(sample_data['total']['used'],total_gpu*0.87)
93
  timestamp_list = []
94
 
95
 
 
127
  col1.metric("Total GPU", f"{total_gpu} GB", f"{user_num} users are sharing now")
128
  if total_gpu != 0:
129
  col2.metric("Used", f"{used_gpu} GB")
130
+ col3.metric("Percent", f"{round(100 * used_gpu/total_gpu, 2)} %",)
131
  else:
132
  col2.metric("Used", f"0 GB")
133
  col3.metric("Percent", f"- %",)