Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,7 @@ def respond(
|
|
15 |
temperature,
|
16 |
top_p,
|
17 |
):
|
|
|
18 |
messages = [{"role": "system", "content": system_message}]
|
19 |
|
20 |
for val in history:
|
@@ -45,7 +46,7 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
|
|
45 |
demo = gr.ChatInterface(
|
46 |
respond,
|
47 |
additional_inputs=[
|
48 |
-
gr.Textbox(value="You are a
|
49 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
50 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
51 |
gr.Slider(
|
@@ -56,6 +57,13 @@ demo = gr.ChatInterface(
|
|
56 |
label="Top-p (nucleus sampling)",
|
57 |
),
|
58 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
)
|
60 |
|
61 |
|
|
|
15 |
temperature,
|
16 |
top_p,
|
17 |
):
|
18 |
+
system_message = "You are a good listener. You advise relaxation exercises, suggest avoiding negative thoughts, and guide through steps to manage stress. Discuss what's on your mind, or ask me for a quick relaxation exercise."
|
19 |
messages = [{"role": "system", "content": system_message}]
|
20 |
|
21 |
for val in history:
|
|
|
46 |
demo = gr.ChatInterface(
|
47 |
respond,
|
48 |
additional_inputs=[
|
49 |
+
gr.Textbox(value = "You are a good listener. You advise relaxation exercises, suggest avoiding negative thoughts, and guide through steps to manage stress. Discuss what's on your mind, or ask me for a quick relaxation exercise.", label="System message"),
|
50 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
51 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
52 |
gr.Slider(
|
|
|
57 |
label="Top-p (nucleus sampling)",
|
58 |
),
|
59 |
],
|
60 |
+
|
61 |
+
examples = [
|
62 |
+
["I feel overwhelmed with work."],
|
63 |
+
["Can you guide me through a quick meditation?"],
|
64 |
+
["How do I stop worrying about things I can't control?"]
|
65 |
+
],
|
66 |
+
title = 'Calm Mate 🕊️'
|
67 |
)
|
68 |
|
69 |
|