remove open llm leaderboard related columns
Browse files
app.py
CHANGED
@@ -17,7 +17,6 @@ HF_TOKEN = os.getenv('HF_TOKEN')
|
|
17 |
|
18 |
|
19 |
headers_models = ["🔢 Serial Number", "👤 Author Name", "📥 Total Downloads", "👍 Total Likes", "🤖 Number of Models",
|
20 |
-
"🏆 Best Model On Open LLM Leaderboard", "🥇 Best Rank On Open LLM Leaderboard",
|
21 |
"📊 Average Downloads per Model", "📈 Average Likes per Model", "🚀 Most Downloaded Model",
|
22 |
"📈 Most Download Count", "❤️ Most Liked Model", "👍 Most Like Count", "🔥 Trending Model",
|
23 |
"👑 Best Rank at Trending Models", "🏷️ Type"]
|
@@ -158,8 +157,6 @@ def make_leaderboard(orgs, users, which_one, data):
|
|
158 |
"Total Downloads": sum_info["Downloads"],
|
159 |
"Total Likes": sum_info["Likes"],
|
160 |
"Number of Models": num_things,
|
161 |
-
"Best Model On Open LLM Leaderboard": open_llm_leaderboard_get_org[1] if open_llm_leaderboard_get_org not in ["Not Found", "Error on Leaderboard"] else open_llm_leaderboard_get_org,
|
162 |
-
"Best Rank On Open LLM Leaderboard": open_llm_leaderboard_get_org[1] if open_llm_leaderboard_get_org not in ["Not Found", "Error on Leaderboard"] else open_llm_leaderboard_get_org,
|
163 |
"Average Downloads per Model": int(sum_info["Downloads"] / num_things) if num_things != 0 else 0,
|
164 |
"Average Likes per Model": int(sum_info["Likes"] / num_things) if num_things != 0 else 0,
|
165 |
"Most Downloaded Model": most_info["Most Download"]["id"],
|
@@ -292,8 +289,6 @@ INTRODUCTION_TEXT = f"""
|
|
292 |
|
293 |
🛠️ The leaderboard's backend mainly runs on the [Hugging Face Hub API](https://huggingface.co/docs/huggingface_hub/v0.5.1/en/package_reference/hf_api).
|
294 |
|
295 |
-
📒 **Note:** In the model's dataframe, there are some columns related to the [Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard). This data is also retrieved through web scraping.
|
296 |
-
|
297 |
📒 **Note:** In trending models/datasets/spaces, first 300 models/datasets/spaces is being retrieved from huggingface.
|
298 |
|
299 |
## 🔍 Searching Organizations and Users
|
@@ -539,7 +534,7 @@ with gr.Blocks() as demo:
|
|
539 |
search_bar_in_df = gr.Textbox(placeholder="🔍 Search for a author", show_label=False)
|
540 |
|
541 |
with gr.TabItem("🏛️ Models", id=1):
|
542 |
-
columns_to_convert = ["Author Name", "
|
543 |
"Most Liked Model", "Trending Model"]
|
544 |
models_df = make_leaderboard(org_names_in_list, user_names_in_list, "models", group_models_by_author(all_models))
|
545 |
models_df = models_df_to_clickable(models_df, columns_to_convert, "models")
|
|
|
17 |
|
18 |
|
19 |
headers_models = ["🔢 Serial Number", "👤 Author Name", "📥 Total Downloads", "👍 Total Likes", "🤖 Number of Models",
|
|
|
20 |
"📊 Average Downloads per Model", "📈 Average Likes per Model", "🚀 Most Downloaded Model",
|
21 |
"📈 Most Download Count", "❤️ Most Liked Model", "👍 Most Like Count", "🔥 Trending Model",
|
22 |
"👑 Best Rank at Trending Models", "🏷️ Type"]
|
|
|
157 |
"Total Downloads": sum_info["Downloads"],
|
158 |
"Total Likes": sum_info["Likes"],
|
159 |
"Number of Models": num_things,
|
|
|
|
|
160 |
"Average Downloads per Model": int(sum_info["Downloads"] / num_things) if num_things != 0 else 0,
|
161 |
"Average Likes per Model": int(sum_info["Likes"] / num_things) if num_things != 0 else 0,
|
162 |
"Most Downloaded Model": most_info["Most Download"]["id"],
|
|
|
289 |
|
290 |
🛠️ The leaderboard's backend mainly runs on the [Hugging Face Hub API](https://huggingface.co/docs/huggingface_hub/v0.5.1/en/package_reference/hf_api).
|
291 |
|
|
|
|
|
292 |
📒 **Note:** In trending models/datasets/spaces, first 300 models/datasets/spaces is being retrieved from huggingface.
|
293 |
|
294 |
## 🔍 Searching Organizations and Users
|
|
|
534 |
search_bar_in_df = gr.Textbox(placeholder="🔍 Search for a author", show_label=False)
|
535 |
|
536 |
with gr.TabItem("🏛️ Models", id=1):
|
537 |
+
columns_to_convert = ["Author Name", "Most Downloaded Model",
|
538 |
"Most Liked Model", "Trending Model"]
|
539 |
models_df = make_leaderboard(org_names_in_list, user_names_in_list, "models", group_models_by_author(all_models))
|
540 |
models_df = models_df_to_clickable(models_df, columns_to_convert, "models")
|