Tom Aarsen commited on
Commit
13b0b9b
1 Parent(s): 4025917

Add tqdm for external models

Browse files
Files changed (2) hide show
  1. app.py +4 -1
  2. requirements.txt +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import gradio as gr
6
  from huggingface_hub import get_hf_file_metadata, HfApi, hf_hub_download, hf_hub_url
7
  from huggingface_hub.repocard import metadata_load
8
  import pandas as pd
 
9
 
10
  TASKS = [
11
  "BitextMining",
@@ -786,7 +787,9 @@ def add_task(examples):
786
  examples["mteb_task"] = "Unknown"
787
  return examples
788
 
789
- for model in EXTERNAL_MODELS:
 
 
790
  ds = load_dataset("mteb/results", model)
791
  # For local debugging:
792
  #, download_mode='force_redownload', verification_mode="no_checks")
 
6
  from huggingface_hub import get_hf_file_metadata, HfApi, hf_hub_download, hf_hub_url
7
  from huggingface_hub.repocard import metadata_load
8
  import pandas as pd
9
+ from tqdm.autonotebook import tqdm
10
 
11
  TASKS = [
12
  "BitextMining",
 
787
  examples["mteb_task"] = "Unknown"
788
  return examples
789
 
790
+ pbar = tqdm(EXTERNAL_MODELS, desc="Fetching external model results")
791
+ for model in pbar:
792
+ pbar.set_description(f"Fetching external model results for {model!r}")
793
  ds = load_dataset("mteb/results", model)
794
  # For local debugging:
795
  #, download_mode='force_redownload', verification_mode="no_checks")
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
  gradio
2
  datasets
3
  pandas
4
- huggingface_hub
 
 
1
  gradio
2
  datasets
3
  pandas
4
+ huggingface_hub
5
+ tqdm