app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def answer_questions(data, question):
|
|
59 |
if data:
|
60 |
inputs = rag_tokenizer.encode("Question: " + question + " Context: " + data, return_tensors="pt")
|
61 |
outputs = rag_model.generate(inputs, max_length=100)
|
62 |
-
answer = rag_tokenizer.decode(outputs
|
63 |
return answer
|
64 |
else:
|
65 |
return "No data provided"
|
|
|
59 |
if data:
|
60 |
inputs = rag_tokenizer.encode("Question: " + question + " Context: " + data, return_tensors="pt")
|
61 |
outputs = rag_model.generate(inputs, max_length=100)
|
62 |
+
answer = rag_tokenizer.decode(outputs, skip_special_tokens=True)
|
63 |
return answer
|
64 |
else:
|
65 |
return "No data provided"
|