Rule-based and neural chatbot demo with Streamlit deployment and improved intent handling for teens.
This AI Chatbot project was developed as a practical teaching tool for teens aged 12–18. It combines a simple rule-based chatbot with an optional neural network model to improve natural language understanding. The project was deployed using Streamlit, allowing users to test the chatbot in a friendly, web-based interface.
Screenshots of the AI Chatbot interface:
import random
responses = {
"greeting": ["Hello!", "Hi there!", "Nice to meet you!"],
"bye": ["Goodbye!", "See you later!", "Bye for now!"]
}
def get_intent(message):
message = message.lower()
if "hi" in message or "hello" in message:
return "greeting"
elif "bye" in message:
return "bye"
return "unknown"
def chatbot_reply(message):
intent = get_intent(message)
if intent in responses:
return random.choice(responses[intent])
return "I'm not sure I understand. Can you rephrase?"
This project helped teens understand the fundamentals of chatbots, NLP, and intent classification. With a simple Streamlit deployment, students were able to interact with the chatbot and extend its capabilities.