MINGYISU commited on
Commit
2f72459
·
1 Parent(s): 13d06a1

Update model names

Browse files
Files changed (3) hide show
  1. app.py +3 -2
  2. results.csv +1 -1
  3. utils.py +22 -0
app.py CHANGED
@@ -61,13 +61,14 @@ with gr.Blocks() as block:
61
  elem_id="tasks-select"
62
  )
63
 
 
64
  data_component = gr.components.Dataframe(
65
- value=df[COLUMN_NAMES],
66
  headers=COLUMN_NAMES,
67
  type="pandas",
68
  datatype=DATA_TITLE_TYPE,
69
  interactive=False,
70
- visible=True,
71
  )
72
 
73
  refresh_button = gr.Button("Refresh")
 
61
  elem_id="tasks-select"
62
  )
63
 
64
+ print(create_hyperlinked_names(df)[COLUMN_NAMES])
65
  data_component = gr.components.Dataframe(
66
+ value=create_hyperlinked_names(df)[COLUMN_NAMES],
67
  headers=COLUMN_NAMES,
68
  type="pandas",
69
  datatype=DATA_TITLE_TYPE,
70
  interactive=False,
71
+ visible=True
72
  )
73
 
74
  refresh_button = gr.Button("Refresh")
results.csv CHANGED
@@ -12,4 +12,4 @@ OpenCLIP-FFT,0.632,TIGER-Lab,47.2,50.5,43.1,56.0,21.9,55.4,64.1
12
  VLM2Vec (Phi-3.5-V-FFT),4.15,TIGER-Lab,55.9,62.8,47.4,52.8,50.3,57.8,72.3
13
  VLM2Vec (Phi-3.5-V-LoRA),4.15,TIGER-Lab,60.1,66.5,52.0,54.8,54.9,62.3,79.5
14
  VLM2Vec (LLaVA-1.6-LoRA-LowRes),7.57,TIGER-Lab,55.0,61.0,47.5,54.7,50.3,56.2,64.0
15
- VLM2Vec (LLaVA-1.6-LoRA-HighRes),7.57,TIGER-Lab,62.9,67.5,57.1,61.2,49.9,67.4,86.1
 
12
  VLM2Vec (Phi-3.5-V-FFT),4.15,TIGER-Lab,55.9,62.8,47.4,52.8,50.3,57.8,72.3
13
  VLM2Vec (Phi-3.5-V-LoRA),4.15,TIGER-Lab,60.1,66.5,52.0,54.8,54.9,62.3,79.5
14
  VLM2Vec (LLaVA-1.6-LoRA-LowRes),7.57,TIGER-Lab,55.0,61.0,47.5,54.7,50.3,56.2,64.0
15
+ VLM2Vec (LLaVA-1.6-LoRA-HighRes),7.57,TIGER-Lab,62.9,67.5,57.1,61.2,49.9,67.4,86.1
utils.py CHANGED
@@ -96,6 +96,27 @@ SUBMIT_INTRODUCTION = """# Submit on MMEB Leaderboard Introduction
96
  Please send us an email at m7su@uwaterloo.ca, attaching the JSON file. We will review your submission and update the leaderboard accordingly.
97
  """
98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  def get_df():
100
  # fetch the leaderboard data
101
  url = "https://huggingface.co/spaces/TIGER-Lab/MMEB/resolve/main/results.csv"
@@ -105,6 +126,7 @@ def get_df():
105
  sys.exit(f"Error: {response.status_code}")
106
  df = pd.read_csv(io.StringIO(response.text))
107
  df.to_csv(CSV_DIR, index=False) # update local file
 
108
  df['Model Size(B)'] = df['Model Size(B)'].apply(process_model_size)
109
  df = df.sort_values(by=['Overall'], ascending=False)
110
  return df
 
96
  Please send us an email at m7su@uwaterloo.ca, attaching the JSON file. We will review your submission and update the leaderboard accordingly.
97
  """
98
 
99
+ MODEL_URLS = {
100
+ "clip-vit-large-patch14": "https://huggingface.co/openai/clip-vit-large-patch14",
101
+ "blip2-opt-2.7b": "https://huggingface.co/Salesforce/blip2-opt-2.7b",
102
+ "siglip-base-patch16-224": "https://huggingface.co/google/siglip-base-patch16-224",
103
+ "CLIP-ViT-H-14-laion2B-s32B-b79K": "https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K",
104
+ "e5-v": "https://huggingface.co/royokong/e5-v",
105
+ "MagicLens": "https://github.com/google-deepmind/magiclens",
106
+
107
+ }
108
+
109
+ def create_hyperlinked_names(df):
110
+ def add_link_to_model_name(model_name):
111
+ if model_name in MODEL_URLS:
112
+ return f"<a href='{MODEL_URLS[model_name]}'>{model_name}</a>"
113
+ else:
114
+ return model_name
115
+
116
+ df = df.copy()
117
+ df['Models'] = df['Models'].apply(add_link_to_model_name)
118
+ return df
119
+
120
  def get_df():
121
  # fetch the leaderboard data
122
  url = "https://huggingface.co/spaces/TIGER-Lab/MMEB/resolve/main/results.csv"
 
126
  sys.exit(f"Error: {response.status_code}")
127
  df = pd.read_csv(io.StringIO(response.text))
128
  df.to_csv(CSV_DIR, index=False) # update local file
129
+ df = pd.read_csv(CSV_DIR)
130
  df['Model Size(B)'] = df['Model Size(B)'].apply(process_model_size)
131
  df = df.sort_values(by=['Overall'], ascending=False)
132
  return df