zhuohan-7 commited on
Commit
29fc06d
1 Parent(s): f3cadf1

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app/draw_diagram.py +7 -5
  2. app/pages.py +1 -1
app/draw_diagram.py CHANGED
@@ -22,7 +22,7 @@ info_df = pd.read_excel(path)
22
  # except:
23
  # pass
24
 
25
- def draw(folder_name, category_name, dataset_name, metrics):
26
 
27
  folder = f"./results/{metrics}/"
28
 
@@ -59,7 +59,7 @@ def draw(folder_name, category_name, dataset_name, metrics):
59
 
60
  chart_data = chart_data[chart_data['model_show'].isin(models)]
61
 
62
- chart_data = chart_data.sort_values(by=[new_dataset_name], ascending=True).dropna(axis=0)
63
 
64
  # import pdb
65
  # pdb.set_trace()
@@ -133,11 +133,13 @@ def draw(folder_name, category_name, dataset_name, metrics):
133
  # import pdb
134
  # pdb.set_trace()
135
 
 
 
136
  st.dataframe(
137
- chart_data,
138
  column_config={
139
- 'model_show': "Model",
140
- chart_data.columns[1]: {'alignment': 'center'},
141
  "model_link": st.column_config.LinkColumn(
142
  "Model Link",
143
  # # # help="",
 
22
  # except:
23
  # pass
24
 
25
+ def draw(folder_name, category_name, dataset_name, metrics, cus_sort=True):
26
 
27
  folder = f"./results/{metrics}/"
28
 
 
59
 
60
  chart_data = chart_data[chart_data['model_show'].isin(models)]
61
 
62
+ chart_data = chart_data.sort_values(by=[new_dataset_name], ascending=cus_sort).dropna(axis=0)
63
 
64
  # import pdb
65
  # pdb.set_trace()
 
133
  # import pdb
134
  # pdb.set_trace()
135
 
136
+ chart_data_table = chart_data[['model_show', chart_data.columns[1], chart_data.columns[3]]]
137
+
138
  st.dataframe(
139
+ chart_data_table,
140
  column_config={
141
+ 'model_show': 'Model',
142
+ chart_data_table.columns[1]: {'alignment': 'center'},
143
  "model_link": st.column_config.LinkColumn(
144
  "Model Link",
145
  # # # help="",
app/pages.py CHANGED
@@ -128,7 +128,7 @@ def asr():
128
 
129
  if filter_1:
130
  dataset_contents(asr_datsets[filter_1], metrics['wer'])
131
- draw('su', 'ASR', filter_1, 'wer')
132
  # else:
133
  # draw('su', 'ASR', 'LibriSpeech-Test-Clean', 'wer')
134
 
 
128
 
129
  if filter_1:
130
  dataset_contents(asr_datsets[filter_1], metrics['wer'])
131
+ draw('su', 'ASR', filter_1, 'wer', cus_sort=True)
132
  # else:
133
  # draw('su', 'ASR', 'LibriSpeech-Test-Clean', 'wer')
134