tykiww commited on
Commit
7929d48
1 Parent(s): 99be88f

Update services/qa_service/qna.py

Browse files
Files changed (1) hide show
  1. services/qa_service/qna.py +9 -2
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
- context = '\n'.join([i["text"] for i in full_context])
 
 
 
 
 
 
 
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)