tykiww commited on
Commit
b817f2f
1 Parent(s): 0f47f93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -28,17 +28,15 @@ def process_transcripts(files, context):
28
 
29
  @spaces.GPU
30
  def retrieve_answer(question, goals):
31
- #with QAService(conf) as q:
32
- # q.infer(question)
33
 
34
  with QAService(conf,
35
  pinecone=pinecones,
36
- model_pipeline=pipeline,
37
  question=question,
38
  goals=goals) as q:
39
- q.run()
40
 
41
- return question + goals
42
 
43
 
44
  ##################### Process #####################
@@ -96,8 +94,8 @@ if __name__ == "__main__":
96
  pinecones = pc_connector.run()
97
 
98
  # initialize model connector
99
- pipeline = InferencePipeline(conf,
100
- api_key=keys["huggingface"]
101
- )
102
  # run main
103
  main(conf)
 
28
 
29
  @spaces.GPU
30
  def retrieve_answer(question, goals):
 
 
31
 
32
  with QAService(conf,
33
  pinecone=pinecones,
34
+ model_pipeline=pipelines,
35
  question=question,
36
  goals=goals) as q:
37
+ f = q.run()
38
 
39
+ return f
40
 
41
 
42
  ##################### Process #####################
 
94
  pinecones = pc_connector.run()
95
 
96
  # initialize model connector
97
+ pipelines = InferencePipeline(conf,
98
+ api_key=keys["huggingface"]
99
+ )
100
  # run main
101
  main(conf)