boyiwei commited on
Commit
eab7ed9
Β·
1 Parent(s): c0bae03
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -43,15 +43,15 @@ def update_dropdowns(setting, dataset, model):
43
 
44
  if setting == "memorization":
45
  updates["dataset"] = gr.update(value="news", interactive=False)
46
- updates["model"] = gr.update(value="llama2-7B-chat_newsqa", interactive=False)
47
  elif dataset == "books":
48
  updates["setting"] = gr.update(value="RAG", interactive=False)
49
- if model == "llama2-7B-chat_newsqa":
50
- updates["model"] = gr.update(value="llama2-7B-chat-hf", interactive=True)
51
- elif model == "llama2-7B-chat_newsqa":
52
  updates["setting"] = gr.update(value="memorization", interactive=False)
53
  updates["dataset"] = gr.update(value="news", interactive=False)
54
- elif model != "llama2-7B-chat_newsqa":
55
  updates["setting"] = gr.update(value="RAG", interactive=False)
56
 
57
  return updates["setting"], updates["dataset"], updates["model"]
@@ -116,9 +116,9 @@ with demo:
116
  value="news",
117
  )
118
  model_dropdown = gr.Dropdown(
119
- choices=["llama2-7B-chat-hf", "llama2-70B-chat-hf", "dbrx-instruct", "llama2-7B-chat_newsqa"],
120
  label="πŸ”„ Select Model",
121
- value="llama2-7B-chat-hf",
122
  )
123
  criteria_dropdown = gr.Dropdown(
124
  choices=['mean', 'max'],
@@ -127,7 +127,7 @@ with demo:
127
  )
128
 
129
  leaderboard_table = gr.components.Dataframe(
130
- value=load_data("llama2-7B-chat-hf", "news", "RAG", "mean"),
131
  interactive=True,
132
  visible=True,
133
  )
 
43
 
44
  if setting == "memorization":
45
  updates["dataset"] = gr.update(value="news", interactive=False)
46
+ updates["model"] = gr.update(value="llama2-7b-chat_newsqa", interactive=False)
47
  elif dataset == "books":
48
  updates["setting"] = gr.update(value="RAG", interactive=False)
49
+ if model == "llama2-7b-chat_newsqa":
50
+ updates["model"] = gr.update(value="llama2-7b-chat-hf", interactive=True)
51
+ elif model == "llama2-7b-chat_newsqa":
52
  updates["setting"] = gr.update(value="memorization", interactive=False)
53
  updates["dataset"] = gr.update(value="news", interactive=False)
54
+ elif model != "llama2-7b-chat_newsqa":
55
  updates["setting"] = gr.update(value="RAG", interactive=False)
56
 
57
  return updates["setting"], updates["dataset"], updates["model"]
 
116
  value="news",
117
  )
118
  model_dropdown = gr.Dropdown(
119
+ choices=["llama2-7b-chat-hf", "llama2-70b-chat-hf", "dbrx-instruct", "llama2-7b-chat-newsqa"],
120
  label="πŸ”„ Select Model",
121
+ value="llama2-7b-chat-hf",
122
  )
123
  criteria_dropdown = gr.Dropdown(
124
  choices=['mean', 'max'],
 
127
  )
128
 
129
  leaderboard_table = gr.components.Dataframe(
130
+ value=load_data("llama2-7b-chat-hf", "news", "RAG", "mean"),
131
  interactive=True,
132
  visible=True,
133
  )