Update app.py
Browse files
app.py
CHANGED
@@ -619,7 +619,7 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
619 |
url = "https://huggingface.co/api/spaces"
|
620 |
params = {
|
621 |
'full': 'true',
|
622 |
-
'limit':
|
623 |
}
|
624 |
|
625 |
if sort_type == "modes":
|
@@ -669,7 +669,7 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
669 |
|
670 |
fig.update_layout(
|
671 |
title={
|
672 |
-
'text': f'Hugging Face Spaces {sort_type.title()} Rankings (Top
|
673 |
'y':0.95,
|
674 |
'x':0.5,
|
675 |
'xanchor': 'center',
|
@@ -678,9 +678,9 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
678 |
xaxis_title='Space ID',
|
679 |
yaxis_title='Rank',
|
680 |
yaxis=dict(
|
681 |
-
ticktext=[str(i) for i in range(1,
|
682 |
-
tickvals=[
|
683 |
-
range=[0,
|
684 |
),
|
685 |
height=800,
|
686 |
showlegend=False,
|
@@ -831,7 +831,7 @@ def get_trending_spaces_without_token():
|
|
831 |
params = {
|
832 |
'sort': 'likes',
|
833 |
'direction': -1,
|
834 |
-
'limit':
|
835 |
'full': 'true'
|
836 |
}
|
837 |
|
|
|
619 |
url = "https://huggingface.co/api/spaces"
|
620 |
params = {
|
621 |
'full': 'true',
|
622 |
+
'limit': 400
|
623 |
}
|
624 |
|
625 |
if sort_type == "modes":
|
|
|
669 |
|
670 |
fig.update_layout(
|
671 |
title={
|
672 |
+
'text': f'Hugging Face Spaces {sort_type.title()} Rankings (Top 400)',
|
673 |
'y':0.95,
|
674 |
'x':0.5,
|
675 |
'xanchor': 'center',
|
|
|
678 |
xaxis_title='Space ID',
|
679 |
yaxis_title='Rank',
|
680 |
yaxis=dict(
|
681 |
+
ticktext=[str(i) for i in range(1, 401, 20)],
|
682 |
+
tickvals=[401 - i for i in range(1, 401, 20)],
|
683 |
+
range=[0, 400]
|
684 |
),
|
685 |
height=800,
|
686 |
showlegend=False,
|
|
|
831 |
params = {
|
832 |
'sort': 'likes',
|
833 |
'direction': -1,
|
834 |
+
'limit': 400,
|
835 |
'full': 'true'
|
836 |
}
|
837 |
|