Update app.py
Browse files
app.py
CHANGED
|
@@ -135,8 +135,7 @@ class RAG:
|
|
| 135 |
return answer
|
| 136 |
|
| 137 |
def extractive_query(self, question):
|
| 138 |
-
context = self.retriever.retrieve_top_k(question, k=
|
| 139 |
-
|
| 140 |
|
| 141 |
inputs = self.generator_tokenizer(question, ". ".join(context), return_tensors="pt", truncation=True, max_length=150, padding="max_length")
|
| 142 |
with torch.no_grad():
|
|
|
|
| 135 |
return answer
|
| 136 |
|
| 137 |
def extractive_query(self, question):
|
| 138 |
+
context = self.retriever.retrieve_top_k(question, k=4)
|
|
|
|
| 139 |
|
| 140 |
inputs = self.generator_tokenizer(question, ". ".join(context), return_tensors="pt", truncation=True, max_length=150, padding="max_length")
|
| 141 |
with torch.no_grad():
|