openfree commited on
Commit
0852d99
·
verified ·
1 Parent(s): a30a3d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
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': 10000,
307
  'sort': 'downloads',
308
  'direction': -1
309
  }
@@ -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, 10001, 50)],
382
- tickvals=[10001 - i for i in range(1, 10001, 50)],
383
- range=[0, 10000]
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': 300
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, 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,
 
303
  progress(0, desc="Fetching models data...")
304
  params = {
305
  'full': 'true',
306
+ 'limit': 3000,
307
  'sort': 'downloads',
308
  'direction': -1
309
  }
 
378
  xaxis_title='Model ID',
379
  yaxis_title='Global Rank',
380
  yaxis=dict(
381
+ ticktext=[str(i) for i in range(1, 3001, 50)],
382
+ tickvals=[3001 - i for i in range(1, 3001, 50)],
383
+ range=[0, 3000]
384
  ),
385
  height=800,
386
  showlegend=False,
 
533
  url = f"https://huggingface.co/api/spaces"
534
  params = {
535
  'full': 'true',
536
+ 'limit': 2400
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, 2401, 20)], # 1부터 300까지 20 간격
596
+ tickvals=[2401 - i for i in range(1, 2401, 20)], # 반전된 값
597
+ range=[0, 2400] # y축 범위 설정
598
  ),
599
  height=800,
600
  showlegend=False,