Spaces:
Runtime error
Runtime error
Commit
Β·
adf5d9a
1
Parent(s):
cad4a51
add concurrency
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def group_collection_items(collection_slug: str):
|
|
79 |
items = collection.items
|
80 |
return groupby(get_collection_type, items)
|
81 |
|
82 |
-
@cached(cache=TTLCache(maxsize=
|
83 |
def get_papers_for_collection(collection_slug: str):
|
84 |
dataset_to_arxiv_id = create_dataset_to_arxiv_id_dict()
|
85 |
models_to_arxiv_id = create_model_to_arxiv_id_dict()
|
@@ -155,4 +155,4 @@ gr.Interface(
|
|
155 |
description=description,
|
156 |
examples=examples,
|
157 |
cache_examples=True,
|
158 |
-
).launch()
|
|
|
79 |
items = collection.items
|
80 |
return groupby(get_collection_type, items)
|
81 |
|
82 |
+
@cached(cache=TTLCache(maxsize=500, ttl=CACHE_TIME))
|
83 |
def get_papers_for_collection(collection_slug: str):
|
84 |
dataset_to_arxiv_id = create_dataset_to_arxiv_id_dict()
|
85 |
models_to_arxiv_id = create_model_to_arxiv_id_dict()
|
|
|
155 |
description=description,
|
156 |
examples=examples,
|
157 |
cache_examples=True,
|
158 |
+
).queue(concurrency_count=4).launch()
|