saattrupdan commited on
Commit
c878c57
·
1 Parent(s): 7b43a09

fix: Default dropdown choices of models

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -144,13 +144,12 @@ def main() -> None:
144
  results_dfs = fetch_results()
145
  last_fetch = dt.datetime.now()
146
 
147
- all_languages: list[str | int | float | tuple[str, str | int | float]] | None = [
148
  language.name for language in ALL_LANGUAGES.values()
149
  ]
150
- all_models: list[str | int | float | tuple[str, str | int | float]] | None = list({
151
  model_id
152
- for df in results_dfs.values()
153
- for model_id in df.index
154
  })
155
 
156
  with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
@@ -170,7 +169,7 @@ def main() -> None:
170
  interactive=True,
171
  )
172
  model_ids_dropdown = gr.Dropdown(
173
- choices=all_models,
174
  multiselect=True,
175
  label="Models",
176
  value=["gpt-3.5-turbo-0613", "mistralai/Mistral-7B-v0.1"],
 
144
  results_dfs = fetch_results()
145
  last_fetch = dt.datetime.now()
146
 
147
+ all_languages = [
148
  language.name for language in ALL_LANGUAGES.values()
149
  ]
150
+ danish_models = list({
151
  model_id
152
+ for model_id in results_dfs[DANISH].index
 
153
  })
154
 
155
  with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
 
169
  interactive=True,
170
  )
171
  model_ids_dropdown = gr.Dropdown(
172
+ choices=danish_models,
173
  multiselect=True,
174
  label="Models",
175
  value=["gpt-3.5-turbo-0613", "mistralai/Mistral-7B-v0.1"],