Update app_R.py
Browse files
app_R.py
CHANGED
@@ -5,8 +5,8 @@ from transformers import RagRetriever, RagSequenceForGeneration
|
|
5 |
# Load model
|
6 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
7 |
|
8 |
-
dataset_path = "./
|
9 |
-
index_path = "./
|
10 |
|
11 |
retriever = RagRetriever.from_pretrained("facebook/rag-sequence-nq", index_name="custom",
|
12 |
passages_path = dataset_path,
|
|
|
5 |
# Load model
|
6 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
7 |
|
8 |
+
dataset_path = "./5k_index_data/my_knowledge_dataset"
|
9 |
+
index_path = "./5k_index_data/my_knowledge_dataset_hnsw_index.faiss"
|
10 |
|
11 |
retriever = RagRetriever.from_pretrained("facebook/rag-sequence-nq", index_name="custom",
|
12 |
passages_path = dataset_path,
|