openfree commited on
Commit
f40cbb9
·
verified ·
1 Parent(s): e25383c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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': 1000
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 1000)',
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, 1001, 20)],
682
- tickvals=[1001 - i for i in range(1, 1001, 20)],
683
- range=[0, 1000]
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': 1000,
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