Spaces:
Sleeping
Sleeping
Update services/qa_service/qna.py
Browse files
services/qa_service/qna.py
CHANGED
@@ -51,10 +51,10 @@ class QAService:
|
|
51 |
def run(self):
|
52 |
"""Query pinecone outputs and infer results"""
|
53 |
full_context = self.retrieve_context()
|
54 |
-
print(full_context)
|
55 |
-
context = [i["text"] for i in full_context]
|
56 |
|
|
|
|
|
57 |
prompt = format_prompt(self.question, context)
|
58 |
output = self.model_pipeline.infer(prompt)
|
59 |
|
60 |
-
return
|
|
|
51 |
def run(self):
|
52 |
"""Query pinecone outputs and infer results"""
|
53 |
full_context = self.retrieve_context()
|
|
|
|
|
54 |
|
55 |
+
context = '\n'.join([i["text"] for i in full_context])
|
56 |
+
|
57 |
prompt = format_prompt(self.question, context)
|
58 |
output = self.model_pipeline.infer(prompt)
|
59 |
|
60 |
+
return output, context
|