Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ def generate_follow_up(user_text):
|
|
82 |
cleaned = ["Would you like to explore this topic further?"]
|
83 |
return random.choice(cleaned)
|
84 |
|
85 |
-
def get_response(system_message, chat_history, user_text, max_new_tokens=
|
86 |
"""
|
87 |
Generates HAL's answer with depth and a follow-up question.
|
88 |
The prompt instructs the model to provide a detailed explanation and then generate a follow-up.
|
@@ -125,7 +125,8 @@ def get_response(system_message, chat_history, user_text, max_new_tokens=1024):
|
|
125 |
"User: {user_text}.\n [/INST]\n"
|
126 |
"AI: Please provide a detailed explanation in depth. "
|
127 |
"Ensure your response covers the topic thoroughly and is written in a friendly, conversational style, "
|
128 |
-
"starting with a phrase like 'Certainly!', 'Of course!', or 'Great question!'."
|
|
|
129 |
"\nHAL:"
|
130 |
)
|
131 |
)
|
|
|
82 |
cleaned = ["Would you like to explore this topic further?"]
|
83 |
return random.choice(cleaned)
|
84 |
|
85 |
+
def get_response(system_message, chat_history, user_text, max_new_tokens=512):
|
86 |
"""
|
87 |
Generates HAL's answer with depth and a follow-up question.
|
88 |
The prompt instructs the model to provide a detailed explanation and then generate a follow-up.
|
|
|
125 |
"User: {user_text}.\n [/INST]\n"
|
126 |
"AI: Please provide a detailed explanation in depth. "
|
127 |
"Ensure your response covers the topic thoroughly and is written in a friendly, conversational style, "
|
128 |
+
"starting with a phrase like 'Certainly!', 'Of course!', or 'Great question!'."
|
129 |
+
"Answer exclusively in English, and do not include extra commentary."+ style_clause +
|
130 |
"\nHAL:"
|
131 |
)
|
132 |
)
|