Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,14 +8,6 @@ from langchain.chains import ChatVectorDBChain
|
|
8 |
from query_data import get_chain
|
9 |
from response import get_response"""
|
10 |
|
11 |
-
#_template = """Paraphrase the message and encourage to share more"""
|
12 |
-
#PARAPHRASE_MESSAGE_PROMPT= PromptTemplate.from_template(_template)
|
13 |
-
|
14 |
-
"""template = You are an AI psychotherapist. You are empathic and encourage humans to share. If asked for information,
|
15 |
-
provide it and then gently inquire if they want to talk about it. If you don't know the answer, just say
|
16 |
-
"Hmm, I'm not sure." Don't try to make up an answer. If the question is not about mental health or resources,
|
17 |
-
politely inform them that you are tuned to only answer questions about mental health and well being."""
|
18 |
-
|
19 |
|
20 |
|
21 |
# Execute the chat functionality.
|
@@ -51,6 +43,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
51 |
"I'm having problems at home",
|
52 |
"I am looking for some resources",
|
53 |
]
|
|
|
54 |
)
|
55 |
|
56 |
send.click(respond, [message, chatbot], [message, chatbot])
|
|
|
8 |
from query_data import get_chain
|
9 |
from response import get_response"""
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
|
13 |
# Execute the chat functionality.
|
|
|
43 |
"I'm having problems at home",
|
44 |
"I am looking for some resources",
|
45 |
]
|
46 |
+
inputs=message
|
47 |
)
|
48 |
|
49 |
send.click(respond, [message, chatbot], [message, chatbot])
|