Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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=
|
37 |
question=question,
|
38 |
goals=goals) as q:
|
39 |
-
q.run()
|
40 |
|
41 |
-
return
|
42 |
|
43 |
|
44 |
##################### Process #####################
|
@@ -96,8 +94,8 @@ if __name__ == "__main__":
|
|
96 |
pinecones = pc_connector.run()
|
97 |
|
98 |
# initialize model connector
|
99 |
-
|
100 |
-
|
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)
|