Vokturz commited on
Commit
0cc3d3a
1 Parent(s): beeb9f6

fix way num parameters are displayed

Browse files
Files changed (1) hide show
  1. src/app.py +3 -1
src/app.py CHANGED
@@ -50,6 +50,8 @@ def get_name(index):
50
  row = gpu_specs.iloc[index]
51
  return f"{row['Product Name']} ({row['RAM (GB)']} GB, {row['Year']})"
52
 
 
 
53
  gpu_specs = get_gpu_specs()
54
 
55
  _, col, _ = st.columns([1,3,1])
@@ -121,7 +123,7 @@ _memory_table = _memory_table.stack().reset_index()
121
  _memory_table.columns = ['dtype', 'Variable', 'Number of GPUs']
122
  col1, col2 = st.columns([1,1.3])
123
  with col1:
124
- st.write(f"#### [{model_name}](https://huggingface.co/{model_name}) ({memory_table.iloc[3,0]:.1f}B)")
125
 
126
  dtypes = memory_table.columns.tolist()[::-1]
127
  tabs = st.tabs(dtypes)
 
50
  row = gpu_specs.iloc[index]
51
  return f"{row['Product Name']} ({row['RAM (GB)']} GB, {row['Year']})"
52
 
53
+ def custom_ceil(a, precision=0):
54
+ return np.round(a + 0.5 * 10**(-precision), precision)
55
  gpu_specs = get_gpu_specs()
56
 
57
  _, col, _ = st.columns([1,3,1])
 
123
  _memory_table.columns = ['dtype', 'Variable', 'Number of GPUs']
124
  col1, col2 = st.columns([1,1.3])
125
  with col1:
126
+ st.write(f"#### [{model_name}](https://huggingface.co/{model_name}) ({custom_ceil(memory_table.iloc[3,0],1):.1f}B)")
127
 
128
  dtypes = memory_table.columns.tolist()[::-1]
129
  tabs = st.tabs(dtypes)