Spaces:
Runtime error
Runtime error
minor fixes in the code
Browse files
app.py
CHANGED
|
@@ -190,7 +190,16 @@ def kpi_chart() -> alt.Chart:
|
|
| 190 |
return chart
|
| 191 |
|
| 192 |
|
| 193 |
-
def render_hub_user_link(hub_id):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
link = f"https://huggingface.co/{hub_id}"
|
| 195 |
return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{hub_id}</a>'
|
| 196 |
|
|
@@ -236,6 +245,16 @@ def fetch_data() -> None:
|
|
| 236 |
|
| 237 |
|
| 238 |
def get_top(N = 50) -> pd.DataFrame:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
return obtain_top_users(user_ids_annotations, N=N)
|
| 240 |
|
| 241 |
|
|
|
|
| 190 |
return chart
|
| 191 |
|
| 192 |
|
| 193 |
+
def render_hub_user_link(hub_id:str) -> str:
|
| 194 |
+
"""
|
| 195 |
+
This function returns a link to the user's profile on Hugging Face.
|
| 196 |
+
|
| 197 |
+
Args:
|
| 198 |
+
hub_id: The user's id on Hugging Face.
|
| 199 |
+
|
| 200 |
+
Returns:
|
| 201 |
+
A string with the link to the user's profile on Hugging Face.
|
| 202 |
+
"""
|
| 203 |
link = f"https://huggingface.co/{hub_id}"
|
| 204 |
return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{hub_id}</a>'
|
| 205 |
|
|
|
|
| 245 |
|
| 246 |
|
| 247 |
def get_top(N = 50) -> pd.DataFrame:
|
| 248 |
+
"""
|
| 249 |
+
This function returns the top N users with the most annotations.
|
| 250 |
+
|
| 251 |
+
Args:
|
| 252 |
+
N: The number of users to be returned. 50 by default
|
| 253 |
+
|
| 254 |
+
Returns:
|
| 255 |
+
A pandas dataframe with the top N users with the most annotations.
|
| 256 |
+
"""
|
| 257 |
+
|
| 258 |
return obtain_top_users(user_ids_annotations, N=N)
|
| 259 |
|
| 260 |
|