zhuohan-7 commited on
Commit
c751340
1 Parent(s): d1b4d96

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app/draw_diagram.py +4 -1
  2. app/pages.py +1 -2
app/draw_diagram.py CHANGED
@@ -83,8 +83,10 @@ def draw(folder_name, category_name, dataset_name, metrics, cus_sort=True):
83
 
84
  chart_data_table = chart_data[['model_show', chart_data.columns[1], chart_data.columns[3]]]
85
 
 
86
  # Format numeric columns to 2 decimal places
87
- chart_data_table[chart_data_table.columns[1]] = chart_data_table[chart_data_table.columns[1]].apply(lambda x: f"{x:.3f}" if isinstance(x, (int, float)) else x)
 
88
 
89
  cur_dataset_name = chart_data_table.columns[1]
90
 
@@ -117,6 +119,7 @@ def draw(folder_name, category_name, dataset_name, metrics, cus_sort=True):
117
  subset=[chart_data_table.columns[1]], color='yellow'
118
  )
119
 
 
120
  st.dataframe(
121
  styled_df,
122
  column_config={
 
83
 
84
  chart_data_table = chart_data[['model_show', chart_data.columns[1], chart_data.columns[3]]]
85
 
86
+
87
  # Format numeric columns to 2 decimal places
88
+ chart_data_table[chart_data_table.columns[1]] = chart_data_table[chart_data_table.columns[1]].apply(lambda x: round(float(x), 3) if isinstance(float(x), (int, float)) else float(x))
89
+
90
 
91
  cur_dataset_name = chart_data_table.columns[1]
92
 
 
119
  subset=[chart_data_table.columns[1]], color='yellow'
120
  )
121
 
122
+
123
  st.dataframe(
124
  styled_df,
125
  column_config={
app/pages.py CHANGED
@@ -254,8 +254,7 @@ def spt():
254
  if filter_1:
255
  dataset_contents(spt_datasets[filter_1], metrics['bleu'])
256
  draw('su', 'ST', filter_1, 'bleu')
257
- # else:
258
- # draw('su', 'ST', 'Covost2-EN-ID-test', 'bleu')
259
 
260
  def cnasr():
261
  st.title("Task: Automatic Speech Recognition (Chinese)")
 
254
  if filter_1:
255
  dataset_contents(spt_datasets[filter_1], metrics['bleu'])
256
  draw('su', 'ST', filter_1, 'bleu')
257
+
 
258
 
259
  def cnasr():
260
  st.title("Task: Automatic Speech Recognition (Chinese)")