Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,9 +17,9 @@ import spaces
|
|
17 |
|
18 |
#################### Functions ####################
|
19 |
@spaces.GPU
|
20 |
-
def process_transcripts(files, context):
|
21 |
|
22 |
-
print(
|
23 |
with EmbeddingService(conf,
|
24 |
pinecone=pinecones) as e:
|
25 |
f = e.run(files)
|
@@ -28,8 +28,8 @@ def process_transcripts(files, context):
|
|
28 |
|
29 |
@spaces.GPU
|
30 |
def retrieve_answer(question, goals, session_key):
|
31 |
-
sess_key = session_key
|
32 |
|
|
|
33 |
with QAService(conf,
|
34 |
pinecone=pinecones,
|
35 |
model_pipeline=pipelines,
|
@@ -89,7 +89,7 @@ def main(conf):
|
|
89 |
goals = gr.Textbox(label="Analysis Goals",
|
90 |
value=conf["defaults"]["goals"]) # not incorporated yet. Will be with Q&A.
|
91 |
repository = gr.Textbox(label="Progress", value="Waiting for load...", visible=True)
|
92 |
-
load_file.upload(process_transcripts, [load_file, goals], repository)
|
93 |
|
94 |
|
95 |
|
|
|
17 |
|
18 |
#################### Functions ####################
|
19 |
@spaces.GPU
|
20 |
+
def process_transcripts(files, context, session_key):
|
21 |
|
22 |
+
print(session_key)
|
23 |
with EmbeddingService(conf,
|
24 |
pinecone=pinecones) as e:
|
25 |
f = e.run(files)
|
|
|
28 |
|
29 |
@spaces.GPU
|
30 |
def retrieve_answer(question, goals, session_key):
|
|
|
31 |
|
32 |
+
print(session_key)
|
33 |
with QAService(conf,
|
34 |
pinecone=pinecones,
|
35 |
model_pipeline=pipelines,
|
|
|
89 |
goals = gr.Textbox(label="Analysis Goals",
|
90 |
value=conf["defaults"]["goals"]) # not incorporated yet. Will be with Q&A.
|
91 |
repository = gr.Textbox(label="Progress", value="Waiting for load...", visible=True)
|
92 |
+
load_file.upload(process_transcripts, [load_file, goals, output_unique_key], repository)
|
93 |
|
94 |
|
95 |
|