Spaces:
Runtime error
Runtime error
lhzstar
commited on
Commit
•
427e102
1
Parent(s):
fe183af
new commits
Browse files- celebbot.py +1 -1
celebbot.py
CHANGED
@@ -171,7 +171,7 @@ class CelebBot():
|
|
171 |
else:
|
172 |
knowledge = self.retrieve_knowledge_assertions()
|
173 |
|
174 |
-
query = f"Context: {instruction} {knowledge}\n\
|
175 |
input_ids = self.QA_tokenizer(f"{query}", truncation=False, return_tensors="pt").input_ids.to(self.QA_model.device)
|
176 |
outputs = self.QA_model.generate(input_ids, max_length=1024, min_length=8, repetition_penalty=2.5)
|
177 |
self.text = self.QA_tokenizer.decode(outputs[0], skip_special_tokens=True)
|
|
|
171 |
else:
|
172 |
knowledge = self.retrieve_knowledge_assertions()
|
173 |
|
174 |
+
query = f"Context: {instruction} {knowledge}\n\nQuestion: {self.text}\n\nAnswer:"
|
175 |
input_ids = self.QA_tokenizer(f"{query}", truncation=False, return_tensors="pt").input_ids.to(self.QA_model.device)
|
176 |
outputs = self.QA_model.generate(input_ids, max_length=1024, min_length=8, repetition_penalty=2.5)
|
177 |
self.text = self.QA_tokenizer.decode(outputs[0], skip_special_tokens=True)
|