tykiww commited on
Commit
23e9e9c
·
verified ·
1 Parent(s): b3fc90b

Update services/qa_service/qna.py

Browse files
Files changed (1) hide show
  1. services/qa_service/qna.py +3 -3
services/qa_service/qna.py CHANGED
@@ -1,11 +1,11 @@
1
  import json
2
 
3
  class QAService:
4
- def __init__(self, conf, pinecone, model, question, context):
5
  self.conf = conf
6
  self.pc = pinecone['connection']
7
  self.embedder = pinecone['embedder']
8
- self.model = model
9
  self.question = question
10
  self.context = context
11
 
@@ -35,7 +35,7 @@ class QAService:
35
  def run(self):
36
  """Query pinecone outputs and infer results"""
37
  output = self.retrieve_context()
38
- output = self.model.infer(output)
39
 
40
  return output
41
 
 
1
  import json
2
 
3
  class QAService:
4
+ def __init__(self, conf, pinecone, model_pipeline, question, context):
5
  self.conf = conf
6
  self.pc = pinecone['connection']
7
  self.embedder = pinecone['embedder']
8
+ self.model_pipeline = model_pipeline
9
  self.question = question
10
  self.context = context
11
 
 
35
  def run(self):
36
  """Query pinecone outputs and infer results"""
37
  output = self.retrieve_context()
38
+ output = self.model_pipeline.infer(output)
39
 
40
  return output
41