Spaces:
Sleeping
Sleeping
github-actions[bot] commited on
Commit ·
158a1b5
1
Parent(s): 298cc30
chore: sync app/ and src/ from GitHub
Browse files- app/app.py +3 -3
app/app.py
CHANGED
|
@@ -69,6 +69,7 @@ def load_vector_store_cached():
|
|
| 69 |
repo_id="rishadaz/amazon_retriever-storage",
|
| 70 |
repo_type="dataset",
|
| 71 |
local_dir=str(VECTOR_STORE_DIR),
|
|
|
|
| 72 |
token=HF_TOKEN,
|
| 73 |
)
|
| 74 |
|
|
@@ -84,7 +85,7 @@ def load_vector_store_cached():
|
|
| 84 |
# local tag will read from your local directory as a default it will
|
| 85 |
# read the mini versions of the files we have provided in the repo
|
| 86 |
|
| 87 |
-
data_source =
|
| 88 |
|
| 89 |
# note: remote has the full generated corpus and
|
| 90 |
# embeddings which can take a long time to download and
|
|
@@ -136,8 +137,7 @@ hybrid_retriever = HybridRetriever(
|
|
| 136 |
)
|
| 137 |
|
| 138 |
def llm_retriever(query: str, top_k: int = 5):
|
| 139 |
-
|
| 140 |
-
answer, docs = run_rag(retriever, query=query, hf_dataset=HF_DATASET['full'])
|
| 141 |
return answer, docs
|
| 142 |
|
| 143 |
|
|
|
|
| 69 |
repo_id="rishadaz/amazon_retriever-storage",
|
| 70 |
repo_type="dataset",
|
| 71 |
local_dir=str(VECTOR_STORE_DIR),
|
| 72 |
+
split='full',
|
| 73 |
token=HF_TOKEN,
|
| 74 |
)
|
| 75 |
|
|
|
|
| 85 |
# local tag will read from your local directory as a default it will
|
| 86 |
# read the mini versions of the files we have provided in the repo
|
| 87 |
|
| 88 |
+
data_source = os.getenv('DATA_SOURCE')
|
| 89 |
|
| 90 |
# note: remote has the full generated corpus and
|
| 91 |
# embeddings which can take a long time to download and
|
|
|
|
| 137 |
)
|
| 138 |
|
| 139 |
def llm_retriever(query: str, top_k: int = 5):
|
| 140 |
+
answer, docs = run_rag(hybrid_retriever, query=query, hf_dataset=HF_DATASET['full'])
|
|
|
|
| 141 |
return answer, docs
|
| 142 |
|
| 143 |
|