Slycat commited on
Commit
a326a39
1 Parent(s): 45fc740

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -29,20 +29,20 @@ def main(question):
29
  # n_conv = 0
30
  # change_conv(chatbot)
31
  information = retrieval.predict(question, api_name = "/predict")
32
- answer=chat_client.predict(
33
- "Howdy!",
34
- "new.json",
35
- "You are an AI language model and must return truthful responses as per the information below\n ##Input: Information: Your name is Southampton GPT. You are a helpful and truthful chatbot. You can help answer any questions about the Southampton University." +information+question, # str in 'Type an input and press Enter' Textbox component
36
- 0.8,
37
- 0.9,
38
- fn_index=4
39
  )
 
40
  n_conv+=1
41
- print(answer)
42
- temp=json.load(open(answer))
43
- print(temp)
44
 
45
- return temp
46
 
47
 
48
  demo = gr.Interface(main,"text","text")
 
29
  # n_conv = 0
30
  # change_conv(chatbot)
31
  information = retrieval.predict(question, api_name = "/predict")
32
+ client = Client("https://mosaicml-mpt-30b-chat.hf.space/")
33
+ result = chat_client.predict(
34
+
35
+ "Howdy!", # str in 'System Prompt' Textbox component
36
+ "You are an AI language model and must return truthful responses as per the information below\n ##Input: Information: Your name is Southampton GPT. You are a helpful and truthful chatbot. You can help answer any questions about Southampton University."
37
+ + information + question,
38
+ fn_index=3
39
  )
40
+
41
  n_conv+=1
42
+ print(result)
43
+
 
44
 
45
+ return result
46
 
47
 
48
  demo = gr.Interface(main,"text","text")