zhuohan-7 commited on
Commit
0af2238
1 Parent(s): a4a3644

Upload folder using huggingface_hub

Browse files
app/__pycache__/draw_diagram.cpython-312.pyc CHANGED
Binary files a/app/__pycache__/draw_diagram.cpython-312.pyc and b/app/__pycache__/draw_diagram.cpython-312.pyc differ
 
app/draw_diagram.py CHANGED
@@ -8,6 +8,9 @@ import pandas as pd
8
  path = "./style/Leaderboard-Rename-SeaEval.csv"
9
  info_df = pd.read_csv(path).dropna(axis=0)
10
 
 
 
 
11
  def draw(folder_name, category_one, category_two, sort, num_sort):
12
 
13
  folder = f"./results/{folder_name}/"
@@ -30,11 +33,15 @@ def draw(folder_name, category_one, category_two, sort, num_sort):
30
  chart_data['model_show'] = chart_data['Model'].map(display_model_names)
31
  chart_data['model_show'] = chart_data['model_show'].fillna(chart_data['Model'].apply(lambda x: x.replace('_', '-')))
32
 
33
- st.session_state.models = st.multiselect("Please choose the model",
34
- sorted(chart_data['model_show'].tolist()),
35
- default = sorted(chart_data['model_show'].tolist()))
 
 
 
 
36
 
37
- chart_data = chart_data[chart_data['model_show'].isin(st.session_state.models)]
38
 
39
  if num_sort == 'Ascending':
40
  ascend = True
 
8
  path = "./style/Leaderboard-Rename-SeaEval.csv"
9
  info_df = pd.read_csv(path).dropna(axis=0)
10
 
11
+ # if 'models' not in st.session_state:
12
+ # st.session_state.models= []
13
+
14
  def draw(folder_name, category_one, category_two, sort, num_sort):
15
 
16
  folder = f"./results/{folder_name}/"
 
33
  chart_data['model_show'] = chart_data['Model'].map(display_model_names)
34
  chart_data['model_show'] = chart_data['model_show'].fillna(chart_data['Model'].apply(lambda x: x.replace('_', '-')))
35
 
36
+ models = st.multiselect("Please choose the model",
37
+ sorted(chart_data['model_show'].tolist()),
38
+ default=sorted(chart_data['model_show'].tolist()),
39
+ )
40
+
41
+ # if 'Select All' in st.session_state.models:
42
+ # st.session_state.models = chart_data['model_show'].tolist()
43
 
44
+ chart_data = chart_data[chart_data['model_show'].isin(models)]
45
 
46
  if num_sort == 'Ascending':
47
  ascend = True