Spaces:
Sleeping
Sleeping
HaoMingSun
commited on
Commit
•
59f2507
1
Parent(s):
addfeb0
Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,8 @@ greetings = ["hello", "hi", "hey", "greetings", "good morning", "good afternoon"
|
|
10 |
def chatbot(input, conversation_history=[]):
|
11 |
if input:
|
12 |
# Check if the input starts with a common greeting, case-insensitive
|
13 |
-
if any(input.lower().startswith(greet) for greet in greetings):
|
14 |
-
|
15 |
|
16 |
# Append the user's input to the conversation history
|
17 |
conversation_history.append(f"User: {input}")
|
|
|
10 |
def chatbot(input, conversation_history=[]):
|
11 |
if input:
|
12 |
# Check if the input starts with a common greeting, case-insensitive
|
13 |
+
#if any(input.lower().startswith(greet) for greet in greetings):
|
14 |
+
conversation_history = [] # Reset the conversation history if a greeting is detected
|
15 |
|
16 |
# Append the user's input to the conversation history
|
17 |
conversation_history.append(f"User: {input}")
|