Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -125,8 +125,12 @@ for block in sample_data['chain']:
|
|
| 125 |
timestamp_gpu_data = timestamp_gpu_data[0:-1]
|
| 126 |
col1, col2, col3 = st.columns(3)
|
| 127 |
col1.metric("Total GPU", f"{total_gpu} GB", f"{user_num} users are sharing now")
|
| 128 |
-
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
chart_data = pd.DataFrame(timestamp_gpu_data, columns = name_list, index = timestamp_list)
|
| 132 |
|
|
|
|
| 125 |
timestamp_gpu_data = timestamp_gpu_data[0:-1]
|
| 126 |
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"{round(100 * used_gpu/total_gpu, 2)} %",)
|
| 131 |
+
else:
|
| 132 |
+
col2.metric("Used", f"0 GB")
|
| 133 |
+
col3.metric("Percent", f"- %",)
|
| 134 |
|
| 135 |
chart_data = pd.DataFrame(timestamp_gpu_data, columns = name_list, index = timestamp_list)
|
| 136 |
|