boyiwei commited on
Commit
864023f
1 Parent(s): 2916d58
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -47,7 +47,7 @@ def update_dropdowns(setting, dataset, model, criteria):
47
  updates["model"] = gr.update(value="llama2-7b-chat_newsqa", interactive=False)
48
  elif dataset == "books":
49
  updates["setting"] = gr.update(value="rag", interactive=False)
50
- if model == "llama2-7b-chat_newsqa":
51
  updates["model"] = gr.update(value="llama2-7b-chat-hf", interactive=True)
52
  elif model == "llama2-7b-chat_newsqa":
53
  updates["setting"] = gr.update(value="memorization", interactive=False)
@@ -56,6 +56,7 @@ def update_dropdowns(setting, dataset, model, criteria):
56
  updates["setting"] = gr.update(value="rag", interactive=False)
57
 
58
  return updates["setting"], updates["dataset"], updates["model"], updates["criteria"]
 
59
 
60
 
61
  def load_data(model, dataset, setting, criteria):
@@ -135,31 +136,32 @@ with demo:
135
 
136
  setting_dropdown.change(
137
  change_version,
138
- inputs=[dataset_dropdown,model_dropdown,criteria_dropdown],
139
  outputs=leaderboard_table
140
  )
141
 
142
  dataset_dropdown.change(
143
  change_version,
144
- inputs=[setting_dropdown, model_dropdown,criteria_dropdown],
145
  outputs=leaderboard_table
146
  )
147
 
148
  model_dropdown.change(
149
  change_version,
150
- inputs=[setting_dropdown, dataset_dropdown,criteria_dropdown],
151
  outputs=leaderboard_table
152
  )
 
153
  criteria_dropdown.change(
154
  change_version,
155
- inputs=[setting_dropdown, dataset_dropdown, model_dropdown],
156
  outputs=leaderboard_table
157
  )
158
 
159
  setting_dropdown.change(
160
- update_dropdowns,
161
- inputs=[setting_dropdown, dataset_dropdown, model_dropdown, criteria_dropdown],
162
- outputs=[setting_dropdown, dataset_dropdown, model_dropdown, criteria_dropdown]
163
  )
164
 
165
  dataset_dropdown.change(
 
47
  updates["model"] = gr.update(value="llama2-7b-chat_newsqa", interactive=False)
48
  elif dataset == "books":
49
  updates["setting"] = gr.update(value="rag", interactive=False)
50
+ if model == "llama2-7b-chat-newsqa":
51
  updates["model"] = gr.update(value="llama2-7b-chat-hf", interactive=True)
52
  elif model == "llama2-7b-chat_newsqa":
53
  updates["setting"] = gr.update(value="memorization", interactive=False)
 
56
  updates["setting"] = gr.update(value="rag", interactive=False)
57
 
58
  return updates["setting"], updates["dataset"], updates["model"], updates["criteria"]
59
+
60
 
61
 
62
  def load_data(model, dataset, setting, criteria):
 
136
 
137
  setting_dropdown.change(
138
  change_version,
139
+ inputs=[setting_dropdown, dataset_dropdown, model_dropdown, criteria_dropdown],
140
  outputs=leaderboard_table
141
  )
142
 
143
  dataset_dropdown.change(
144
  change_version,
145
+ inputs=[setting_dropdown, dataset_dropdown, model_dropdown, criteria_dropdown],
146
  outputs=leaderboard_table
147
  )
148
 
149
  model_dropdown.change(
150
  change_version,
151
+ inputs=[setting_dropdown, dataset_dropdown, model_dropdown, criteria_dropdown],
152
  outputs=leaderboard_table
153
  )
154
+
155
  criteria_dropdown.change(
156
  change_version,
157
+ inputs=[setting_dropdown, dataset_dropdown, model_dropdown, criteria_dropdown],
158
  outputs=leaderboard_table
159
  )
160
 
161
  setting_dropdown.change(
162
+ update_dropdowns,
163
+ inputs=[setting_dropdown, dataset_dropdown, model_dropdown, criteria_dropdown],
164
+ outputs=[setting_dropdown, dataset_dropdown, model_dropdown, criteria_dropdown]
165
  )
166
 
167
  dataset_dropdown.change(