Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,10 +20,10 @@ if 'conversation' not in st.session_state:
|
|
20 |
|
21 |
# Define multiple system prompts to control bot's behavior
|
22 |
system_prompts = [
|
23 |
-
"You are a
|
24 |
-
"You are a
|
25 |
"You are an informative assistant. Respond clearly and concisely to any questions asked.",
|
26 |
-
"You are a
|
27 |
]
|
28 |
|
29 |
# Select a random system prompt to start the conversation
|
@@ -41,7 +41,7 @@ def generate_response(input_text):
|
|
41 |
# Prepare the user input by appending it to the history
|
42 |
user_input = f"conversation: {input_text} "
|
43 |
|
44 |
-
# Concatenate history (
|
45 |
full_input = "".join(st.session_state['history']) + user_input
|
46 |
|
47 |
# Tokenize input text and generate response from the model
|
|
|
20 |
|
21 |
# Define multiple system prompts to control bot's behavior
|
22 |
system_prompts = [
|
23 |
+
"You are a fun, casual chatbot. Keep the conversation light-hearted and interesting.",
|
24 |
+
"You are a friendly assistant. Respond in a polite, friendly, and informative manner.",
|
25 |
"You are an informative assistant. Respond clearly and concisely to any questions asked.",
|
26 |
+
"You are a compassionate listener, always responding with kindness and empathy."
|
27 |
]
|
28 |
|
29 |
# Select a random system prompt to start the conversation
|
|
|
41 |
# Prepare the user input by appending it to the history
|
42 |
user_input = f"conversation: {input_text} "
|
43 |
|
44 |
+
# Concatenate history (only user input after system prompt)
|
45 |
full_input = "".join(st.session_state['history']) + user_input
|
46 |
|
47 |
# Tokenize input text and generate response from the model
|