Spaces:
Running
Running
minor tweaks
Browse files
app.py
CHANGED
|
@@ -46,7 +46,7 @@ try:
|
|
| 46 |
|
| 47 |
snapshot_download(
|
| 48 |
repo_id=RAG_SOURCE,
|
| 49 |
-
repo_type="dataset",
|
| 50 |
token=hf_token,
|
| 51 |
local_dir=LOCAL_DATA_DIR
|
| 52 |
)
|
|
@@ -57,7 +57,7 @@ try:
|
|
| 57 |
# Load the RAG model from the (now existing) local index path.
|
| 58 |
gr.Info(f'''Loading index from {os.path.join(LOCAL_DATA_DIR, "arxiv_colbert")}...''')
|
| 59 |
RAG = RAGPretrainedModel.from_index(os.path.join(LOCAL_DATA_DIR, "arxiv_colbert"))
|
| 60 |
-
RAG.search("Test query", k=1) # Warm-up query
|
| 61 |
gr.Info("Retriever loaded successfully!")
|
| 62 |
|
| 63 |
except Exception as e:
|
|
|
|
| 46 |
|
| 47 |
snapshot_download(
|
| 48 |
repo_id=RAG_SOURCE,
|
| 49 |
+
repo_type="dataset",
|
| 50 |
token=hf_token,
|
| 51 |
local_dir=LOCAL_DATA_DIR
|
| 52 |
)
|
|
|
|
| 57 |
# Load the RAG model from the (now existing) local index path.
|
| 58 |
gr.Info(f'''Loading index from {os.path.join(LOCAL_DATA_DIR, "arxiv_colbert")}...''')
|
| 59 |
RAG = RAGPretrainedModel.from_index(os.path.join(LOCAL_DATA_DIR, "arxiv_colbert"))
|
| 60 |
+
_ = RAG.search("Test query", k=1) # Warm-up query
|
| 61 |
gr.Info("Retriever loaded successfully!")
|
| 62 |
|
| 63 |
except Exception as e:
|