CultriX commited on
Commit
f7eab11
1 Parent(s): 628bce6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -14
app.py CHANGED
@@ -12,9 +12,9 @@ def calculate_pages(df, items_per_page):
12
  return -(-len(df) // items_per_page) # Equivalent to math.ceil(len(df) / items_per_page)
13
 
14
  @st.cache_data
15
- def cached_model_info(api, model):
16
  try:
17
- return api.model_info(repo_id=str(model))
18
  except (RepositoryNotFoundError, RevisionNotFoundError):
19
  return None
20
 
@@ -179,18 +179,8 @@ def main():
179
  help="Click to download the CSV file",
180
  )
181
  if st.button("Fetch Merge-Configs"):
182
- configurations, matches, csv_data = fetch_merge_configs(full_df)
183
- for config in configurations:
184
- st.text(f"Model Name: {config['Model Name']}\nScores: {config['Scores']}\nAGIEval: {config['AGIEval']}\nGPT4All: {config['GPT4All']}\nTruthfulQA: {config['TruthfulQA']}\nBigbench: {config['Bigbench']}\nModel Card: {config['Model Card']}\n\n")
185
- configurations_df = pd.DataFrame(configurations)
186
- configurations_csv = configurations_df.to_csv(index=False)
187
- st.download_button(
188
- label="Download Configurations",
189
- data=configurations_csv,
190
- file_name="configurations.csv",
191
- key="download-csv",
192
- help="Click to download the CSV file",
193
- )
194
 
195
  create_bar_chart(df, 'Filtered Average')
196
 
 
12
  return -(-len(df) // items_per_page) # Equivalent to math.ceil(len(df) / items_per_page)
13
 
14
  @st.cache_data
15
+ def cached_model_info(_api, model):
16
  try:
17
+ return _api.model_info(repo_id=str(model))
18
  except (RepositoryNotFoundError, RevisionNotFoundError):
19
  return None
20
 
 
179
  help="Click to download the CSV file",
180
  )
181
  if st.button("Fetch Merge-Configs"):
182
+ fetch_merge_configs(full_df)
183
+ st.success("Merge configurations have been fetched and saved.")
 
 
 
 
 
 
 
 
 
 
184
 
185
  create_bar_chart(df, 'Filtered Average')
186