Only allow 1 instance of a particular model name to be in the list.

#40
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -827,12 +827,12 @@ def get_mteb_data(tasks=["Clustering"], langs=[], datasets=[], fillna=True, add_
827
  res["Sequence Length"] = EXTERNAL_MODEL_TO_SEQLEN.get(model, "")
828
  df_list.append(res)
829
 
 
830
  for model in models:
831
  if model.modelId in MODELS_TO_SKIP: continue
832
- print("MODEL", model)
833
- readme_path = hf_hub_download(model.modelId, filename="README.md")
834
- meta = metadata_load(readme_path)
835
- # meta['model-index'][0]["results"] is list of elements like:
836
  # {
837
  # "task": {"type": "Classification"},
838
  # "dataset": {
 
827
  res["Sequence Length"] = EXTERNAL_MODEL_TO_SEQLEN.get(model, "")
828
  df_list.append(res)
829
 
830
+ models_processed_names = []
831
  for model in models:
832
  if model.modelId in MODELS_TO_SKIP: continue
833
+ if model.modelId.split('/')[1] in models_processed_names: continue
834
+ models_processed_names.append(model.modelId.split('/')[1])
835
+ print("MODEL", model) # meta['model-index'][0]["results"] is list of elements like:
 
836
  # {
837
  # "task": {"type": "Classification"},
838
  # "dataset": {