Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ def chat_with_model(message, history, model_choice):
|
|
| 36 |
device = model.device
|
| 37 |
|
| 38 |
# Build the prompt from previous conversation
|
| 39 |
-
prompt = ""
|
| 40 |
for msg in history:
|
| 41 |
role = msg["role"]
|
| 42 |
content = msg["content"]
|
|
@@ -49,7 +49,7 @@ def chat_with_model(message, history, model_choice):
|
|
| 49 |
generation_kwargs = dict(
|
| 50 |
**inputs,
|
| 51 |
streamer=streamer,
|
| 52 |
-
max_new_tokens=
|
| 53 |
temperature=0.7,
|
| 54 |
top_p=0.9,
|
| 55 |
do_sample=True,
|
|
|
|
| 36 |
device = model.device
|
| 37 |
|
| 38 |
# Build the prompt from previous conversation
|
| 39 |
+
prompt = "You are LFM2, an intelligent and conversational AI assistant designed to help users with questions, problem-solving, and creative tasks. You communicate clearly, reason carefully, and explain your thoughts in an easy-to-understand way. Stay friendly, professional, and curious. If the user’s request is ambiguous, ask clarifying questions before proceeding."
|
| 40 |
for msg in history:
|
| 41 |
role = msg["role"]
|
| 42 |
content = msg["content"]
|
|
|
|
| 49 |
generation_kwargs = dict(
|
| 50 |
**inputs,
|
| 51 |
streamer=streamer,
|
| 52 |
+
max_new_tokens=2048,
|
| 53 |
temperature=0.7,
|
| 54 |
top_p=0.9,
|
| 55 |
do_sample=True,
|