tykiww commited on
Commit
e991c57
·
verified ·
1 Parent(s): 100fffc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -7,8 +7,6 @@ import gradio as gr
7
  from utilities.setup import get_files
8
  from server import EmbeddingService, QAService
9
 
10
- import os
11
- os.system("pip freeze")
12
 
13
  #################### Functions ####################
14
  def process_transcripts(files, context):
@@ -20,11 +18,12 @@ def process_transcripts(files, context):
20
  return "Completed Loading Data"
21
 
22
 
23
- def retrieve_answer(question):
24
- with QAService(conf) as q:
25
- q.run(question)
26
- answer = retriever.answer()
27
- return answer
 
28
 
29
 
30
  ##################### Process #####################
@@ -58,7 +57,7 @@ def main(conf):
58
  ask_button = gr.Button("Ask!")
59
  model_output = gr.components.Textbox(label="Answer")
60
  ask_button.click(fn=retrieve_answer,
61
- inputs=question,
62
  outputs=model_output)
63
 
64
 
 
7
  from utilities.setup import get_files
8
  from server import EmbeddingService, QAService
9
 
 
 
10
 
11
  #################### Functions ####################
12
  def process_transcripts(files, context):
 
18
  return "Completed Loading Data"
19
 
20
 
21
+ def retrieve_answer(question, context):
22
+ #with QAService(conf) as q:
23
+ # q.run(question)
24
+
25
+
26
+ return question + context
27
 
28
 
29
  ##################### Process #####################
 
57
  ask_button = gr.Button("Ask!")
58
  model_output = gr.components.Textbox(label="Answer")
59
  ask_button.click(fn=retrieve_answer,
60
+ inputs=[question, goals],
61
  outputs=model_output)
62
 
63