Slycat commited on
Commit
0b3eb46
1 Parent(s): 47cb02d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -23,7 +23,7 @@ def change_conv():
23
  chatbot.chat(init_prompt)
24
  chatbot.cookies = {}
25
 
26
- def main(question):
27
  global n_conv
28
  # if(n_conv > 3):
29
  # n_conv = 0
@@ -40,8 +40,17 @@ def main(question):
40
  print(answer)
41
  temp=json.load(open(answer))
42
  print(temp)
43
- output = temp
44
- return output
 
 
 
 
 
 
 
 
 
45
 
46
 
47
  demo = gr.Interface(main,"text","text")
 
23
  chatbot.chat(init_prompt)
24
  chatbot.cookies = {}
25
 
26
+ def answer_question(question):
27
  global n_conv
28
  # if(n_conv > 3):
29
  # n_conv = 0
 
40
  print(answer)
41
  temp=json.load(open(answer))
42
  print(temp)
43
+ return temp
44
+
45
+ def main(question):
46
+ # text = file_to_text(filename)
47
+ # print(text)
48
+ answer = answer_question("Can you tell me about Soutampton University, Southampton GPT?")
49
+ print(answer)
50
+ output = answer
51
+ return output
52
+
53
+
54
 
55
 
56
  demo = gr.Interface(main,"text","text")