Divya0503 commited on
Commit
678703b
·
verified ·
1 Parent(s): 304933a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,11 +5,11 @@ def chatbot(input_text):
5
  # Define some responses based on input_text
6
  if "hello" in input_text.lower() or "hi" in input_text.lower():
7
  response = "Hello! How can I help you?"
8
- elif "how are you" in input_text.lower():
9
  response = "I'm just a chatbot, but thanks for asking!"
10
- elif "Who are you" in input_text.lower():
11
  response = "I'm a chatbot designed to assist you with various tasks and answer your questions."
12
- elif "what's your name" in input_text.lower():
13
  response = "I'm just a chatbot, I don't have a name."
14
  elif "I'm confused" in input_text.lower():
15
  response = "It's alright. I'm here to help. What are you confused about?"
@@ -23,11 +23,11 @@ def chatbot(input_text):
23
  response = "You're welcome!"
24
  elif "How's the weather today?" in input_text.lower():
25
  response = "I'm not equipped to check the weather, but I hope it's nice wherever you are!"
26
- elif "I'm feeling sad." in input_text.lower():
27
  response = "I'm sorry to hear that. Is there anything specific I can do to help?"
28
  elif "Life is so frustrating!" in input_text.lower():
29
  response = "I understand. Sometimes things can be challenging. Is there anything I can do to assist you?"
30
- elif "Tell me a joke." in input_text.lower():
31
  response = "Sure, here's one: Why don't skeletons fight each other? They don't have the guts!"
32
  else:
33
  response = "I'm sorry, I didn't understand that."
 
5
  # Define some responses based on input_text
6
  if "hello" in input_text.lower() or "hi" in input_text.lower():
7
  response = "Hello! How can I help you?"
8
+ elif "how are you?" in input_text.lower():
9
  response = "I'm just a chatbot, but thanks for asking!"
10
+ elif "Who are you?" in input_text.lower():
11
  response = "I'm a chatbot designed to assist you with various tasks and answer your questions."
12
+ elif "what's your name?" in input_text.lower():
13
  response = "I'm just a chatbot, I don't have a name."
14
  elif "I'm confused" in input_text.lower():
15
  response = "It's alright. I'm here to help. What are you confused about?"
 
23
  response = "You're welcome!"
24
  elif "How's the weather today?" in input_text.lower():
25
  response = "I'm not equipped to check the weather, but I hope it's nice wherever you are!"
26
+ elif "I'm feeling sad" in input_text.lower():
27
  response = "I'm sorry to hear that. Is there anything specific I can do to help?"
28
  elif "Life is so frustrating!" in input_text.lower():
29
  response = "I understand. Sometimes things can be challenging. Is there anything I can do to assist you?"
30
+ elif "Tell me a joke" in input_text.lower():
31
  response = "Sure, here's one: Why don't skeletons fight each other? They don't have the guts!"
32
  else:
33
  response = "I'm sorry, I didn't understand that."