Update app.py
Browse files
app.py
CHANGED
|
@@ -212,21 +212,12 @@ def get_ranking_trend(json_data, org_name):
|
|
| 212 |
return {"id": "Not Found", "rank": "Not Found"}
|
| 213 |
|
| 214 |
|
| 215 |
-
def fetch_data_from_url(url):
|
| 216 |
-
response = requests.get(url)
|
| 217 |
-
if response.status_code == 200:
|
| 218 |
-
data = response.text.splitlines()
|
| 219 |
-
return [line.strip() for line in data]
|
| 220 |
-
else:
|
| 221 |
-
print(f"Failed to fetch data from URL: {url}")
|
| 222 |
-
return []
|
| 223 |
-
|
| 224 |
|
| 225 |
-
|
| 226 |
-
|
| 227 |
|
| 228 |
-
|
| 229 |
-
user_names_in_list =
|
| 230 |
|
| 231 |
datetime_now = str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M"))
|
| 232 |
INTRODUCTION_TEXT = f"""
|
|
@@ -244,9 +235,9 @@ INTRODUCTION_TEXT = f"""
|
|
| 244 |
|
| 245 |
🛠️ 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).
|
| 246 |
|
| 247 |
-
|
| 248 |
|
| 249 |
-
|
| 250 |
|
| 251 |
## 🔍 Searching Organizations and Users
|
| 252 |
|
|
@@ -547,4 +538,4 @@ filtered_datasets_orgs = update_table_datasets(orgs=True, users=False, return_al
|
|
| 547 |
filtered_spaces_users = update_table_spaces(orgs=False, users=True, return_all=True)['Author Name'].tolist()
|
| 548 |
filtered_spaces_orgs = update_table_spaces(orgs=True, users=False, return_all=True)['Author Name'].tolist()
|
| 549 |
|
| 550 |
-
demo.launch(debug=True)
|
|
|
|
| 212 |
return {"id": "Not Found", "rank": "Not Found"}
|
| 213 |
|
| 214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
|
| 216 |
+
with open("org_names.txt", "r") as f:
|
| 217 |
+
org_names_in_list = [i.rstrip("\n") for i in f.readlines()]
|
| 218 |
|
| 219 |
+
with open("user_names.txt", "r") as f:
|
| 220 |
+
user_names_in_list = [i.rstrip("\n") for i in f.readlines()]
|
| 221 |
|
| 222 |
datetime_now = str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M"))
|
| 223 |
INTRODUCTION_TEXT = f"""
|
|
|
|
| 235 |
|
| 236 |
🛠️ 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).
|
| 237 |
|
| 238 |
+
**🌐 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.
|
| 239 |
|
| 240 |
+
**🌐 Note:** In trending models/datasets/spaces, first 300 models/datasets/spaces is being retrieved from huggingface.
|
| 241 |
|
| 242 |
## 🔍 Searching Organizations and Users
|
| 243 |
|
|
|
|
| 538 |
filtered_spaces_users = update_table_spaces(orgs=False, users=True, return_all=True)['Author Name'].tolist()
|
| 539 |
filtered_spaces_orgs = update_table_spaces(orgs=True, users=False, return_all=True)['Author Name'].tolist()
|
| 540 |
|
| 541 |
+
demo.launch(debug=True)
|