Spaces:
Sleeping
Sleeping
Update services/qa_service/qna.py
Browse files
services/qa_service/qna.py
CHANGED
@@ -61,8 +61,15 @@ class QAService:
|
|
61 |
def run(self):
|
62 |
"""Query pinecone outputs and infer results"""
|
63 |
full_context = self.retrieve_context()
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
prompt = format_prompt(self.question, context)
|
68 |
output = self.model_pipeline.infer(prompt)
|
|
|
61 |
def run(self):
|
62 |
"""Query pinecone outputs and infer results"""
|
63 |
full_context = self.retrieve_context()
|
64 |
+
|
65 |
+
transcript_count = len(full_context)
|
66 |
+
|
67 |
+
context = ""
|
68 |
+
for i in range(transcript_count):
|
69 |
+
context = "Transcript " + (i + 1)
|
70 |
+
context += i["text"]
|
71 |
+
if (i+1) < transcript_count:
|
72 |
+
context += "\n\n"
|
73 |
|
74 |
prompt = format_prompt(self.question, context)
|
75 |
output = self.model_pipeline.infer(prompt)
|