davanstrien HF Staff commited on
Commit
a518f79
Β·
1 Parent(s): 52a435b

bump concurrency_count

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  from huggingface_hub import list_spaces
3
  from cachetools import TTLCache, cached
4
  from toolz import groupby, valmap
 
5
  # from diskcache import Cache
6
  # import platform
7
 
@@ -43,7 +44,7 @@ def relative_rank(my_dict, target_key, filter_zero=False):
43
  my_dict = {k: v for k, v in my_dict.items() if v != 0}
44
 
45
  if target_key not in my_dict:
46
- raise gr.Error(f"'{target_key}' not found lease check the ID and try again.")
47
 
48
  sorted_items = sorted(my_dict.items(), key=lambda item: item[1], reverse=True)
49
 
@@ -152,5 +153,4 @@ with gr.Blocks() as demo:
152
  gr.Markdown("""## πŸ… Top 100 Spaces by Likes πŸ…""")
153
  ranking_board = gr.Markdown(plot_top_n_spaces())
154
 
155
-
156
- demo.launch()
 
2
  from huggingface_hub import list_spaces
3
  from cachetools import TTLCache, cached
4
  from toolz import groupby, valmap
5
+
6
  # from diskcache import Cache
7
  # import platform
8
 
 
44
  my_dict = {k: v for k, v in my_dict.items() if v != 0}
45
 
46
  if target_key not in my_dict:
47
+ raise gr.Error(f"'{target_key}' not found please check the ID and try again.")
48
 
49
  sorted_items = sorted(my_dict.items(), key=lambda item: item[1], reverse=True)
50
 
 
153
  gr.Markdown("""## πŸ… Top 100 Spaces by Likes πŸ…""")
154
  ranking_board = gr.Markdown(plot_top_n_spaces())
155
 
156
+ demo.queue(concurrency_count=4).launch()