Spaces:
Configuration error
Configuration error
Update app.py
Browse files
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
|
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)
|