FlameF0X commited on
Commit
e259e65
·
verified ·
1 Parent(s): 22c0038

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -35,7 +35,6 @@ def chat_with_model(message, history, model_choice):
35
  tokenizer, model = load_model(model_choice)
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"]
@@ -61,7 +60,6 @@ def chat_with_model(message, history, model_choice):
61
  partial_text = ""
62
  for new_text in streamer:
63
  partial_text += new_text
64
- # Yield full chat including this updated assistant message
65
  yield history + [
66
  {"role": "user", "content": message},
67
  {"role": "assistant", "content": partial_text},
 
35
  tokenizer, model = load_model(model_choice)
36
  device = model.device
37
 
 
38
  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."
39
  for msg in history:
40
  role = msg["role"]
 
60
  partial_text = ""
61
  for new_text in streamer:
62
  partial_text += new_text
 
63
  yield history + [
64
  {"role": "user", "content": message},
65
  {"role": "assistant", "content": partial_text},