Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
)
|
|
|
40 |
n_conv+=1
|
41 |
-
print(
|
42 |
-
|
43 |
-
print(temp)
|
44 |
|
45 |
-
return
|
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")
|