Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -303,7 +303,7 @@ def get_models_data(progress=gr.Progress()):
|
|
303 |
progress(0, desc="Fetching models data...")
|
304 |
params = {
|
305 |
'full': 'true',
|
306 |
-
'limit':
|
307 |
'sort': 'downloads',
|
308 |
'direction': -1
|
309 |
}
|
@@ -354,7 +354,7 @@ def get_models_data(progress=gr.Progress()):
|
|
354 |
downloads = [model.get('downloads', 0) for model in filtered_models]
|
355 |
|
356 |
# Y์ถ ๊ฐ์ ๋ฐ์
|
357 |
-
y_values = [
|
358 |
|
359 |
# ๋ง๋ ๊ทธ๋ํ ์์ฑ
|
360 |
fig.add_trace(go.Bar(
|
@@ -378,9 +378,9 @@ def get_models_data(progress=gr.Progress()):
|
|
378 |
xaxis_title='Model ID',
|
379 |
yaxis_title='Global Rank',
|
380 |
yaxis=dict(
|
381 |
-
ticktext=[str(i) for i in range(1,
|
382 |
-
tickvals=[
|
383 |
-
range=[0,
|
384 |
),
|
385 |
height=800,
|
386 |
showlegend=False,
|
@@ -533,7 +533,7 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
533 |
url = f"https://huggingface.co/api/spaces"
|
534 |
params = {
|
535 |
'full': 'true',
|
536 |
-
'limit':
|
537 |
}
|
538 |
|
539 |
if sort_type == "modes":
|
@@ -592,9 +592,9 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
592 |
xaxis_title='Space ID',
|
593 |
yaxis_title='Rank',
|
594 |
yaxis=dict(
|
595 |
-
ticktext=[str(i) for i in range(1,
|
596 |
-
tickvals=[
|
597 |
-
range=[0,
|
598 |
),
|
599 |
height=800,
|
600 |
showlegend=False,
|
@@ -615,8 +615,7 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
615 |
space_id = space.get('id', '')
|
616 |
rank = space.get('rank', 'N/A')
|
617 |
likes = space.get('likes', 0)
|
618 |
-
title = space.get('title', 'No Title')
|
619 |
-
|
620 |
description = space.get('description', 'No Description')[:100]
|
621 |
|
622 |
html_content += f"""
|
|
|
303 |
progress(0, desc="Fetching models data...")
|
304 |
params = {
|
305 |
'full': 'true',
|
306 |
+
'limit': 1000,
|
307 |
'sort': 'downloads',
|
308 |
'direction': -1
|
309 |
}
|
|
|
354 |
downloads = [model.get('downloads', 0) for model in filtered_models]
|
355 |
|
356 |
# Y์ถ ๊ฐ์ ๋ฐ์
|
357 |
+
y_values = [1001 - r for r in ranks]
|
358 |
|
359 |
# ๋ง๋ ๊ทธ๋ํ ์์ฑ
|
360 |
fig.add_trace(go.Bar(
|
|
|
378 |
xaxis_title='Model ID',
|
379 |
yaxis_title='Global Rank',
|
380 |
yaxis=dict(
|
381 |
+
ticktext=[str(i) for i in range(1, 1001, 50)],
|
382 |
+
tickvals=[1001 - i for i in range(1, 1001, 50)],
|
383 |
+
range=[0, 1000]
|
384 |
),
|
385 |
height=800,
|
386 |
showlegend=False,
|
|
|
533 |
url = f"https://huggingface.co/api/spaces"
|
534 |
params = {
|
535 |
'full': 'true',
|
536 |
+
'limit': 300
|
537 |
}
|
538 |
|
539 |
if sort_type == "modes":
|
|
|
592 |
xaxis_title='Space ID',
|
593 |
yaxis_title='Rank',
|
594 |
yaxis=dict(
|
595 |
+
ticktext=[str(i) for i in range(1, 301, 20)], # 1๋ถํฐ 300๊น์ง 20 ๊ฐ๊ฒฉ
|
596 |
+
tickvals=[301 - i for i in range(1, 301, 20)], # ๋ฐ์ ๋ ๊ฐ
|
597 |
+
range=[0, 300] # y์ถ ๋ฒ์ ์ค์
|
598 |
),
|
599 |
height=800,
|
600 |
showlegend=False,
|
|
|
615 |
space_id = space.get('id', '')
|
616 |
rank = space.get('rank', 'N/A')
|
617 |
likes = space.get('likes', 0)
|
618 |
+
title = space.get('title', 'No Title')
|
|
|
619 |
description = space.get('description', 'No Description')[:100]
|
620 |
|
621 |
html_content += f"""
|