rodrisouza commited on
Commit
acf9326
·
verified ·
1 Parent(s): c4d3ae0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -85,7 +85,7 @@ def interact(user_input, history, interaction_count):
85
  if messages[i-1].get("role") == messages[i].get("role"):
86
  raise ValueError("Conversation roles must alternate user/assistant/user/assistant/...")
87
 
88
- if interaction_count > MAX_INTERACTIONS:
89
  user_input += ". Thank you for the questions. That's all for now. Goodbye!"
90
 
91
  prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
 
85
  if messages[i-1].get("role") == messages[i].get("role"):
86
  raise ValueError("Conversation roles must alternate user/assistant/user/assistant/...")
87
 
88
+ if interaction_count >= MAX_INTERACTIONS:
89
  user_input += ". Thank you for the questions. That's all for now. Goodbye!"
90
 
91
  prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)