Commit
·
05ceda0
1
Parent(s):
2c755e0
add maxsize for cache
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def format_results(results):
|
|
33 |
return markdown
|
34 |
|
35 |
|
36 |
-
@lru_cache()
|
37 |
def search(query: str):
|
38 |
query_ = sentence_embedding_model.encode(
|
39 |
f"Represent this sentence for searching relevant passages:{query}"
|
@@ -46,7 +46,7 @@ def search(query: str):
|
|
46 |
return format_results(results)
|
47 |
|
48 |
|
49 |
-
@lru_cache()
|
50 |
def hub_id_qdrant_id(hub_id):
|
51 |
matches = client.scroll(
|
52 |
collection_name="dataset_cards",
|
|
|
33 |
return markdown
|
34 |
|
35 |
|
36 |
+
@lru_cache(maxsize=100_000)
|
37 |
def search(query: str):
|
38 |
query_ = sentence_embedding_model.encode(
|
39 |
f"Represent this sentence for searching relevant passages:{query}"
|
|
|
46 |
return format_results(results)
|
47 |
|
48 |
|
49 |
+
@lru_cache(maxsize=100_000)
|
50 |
def hub_id_qdrant_id(hub_id):
|
51 |
matches = client.scroll(
|
52 |
collection_name="dataset_cards",
|