This repository contains a lightweight machine learning (ML) chatbot built in Python. The chatbot is trained on a small intents dataset, learning to classify user inputs and generate appropriate responses. While simple, it demonstrates the fundamentals of designing, training, and evaluating conversational AI models.
- Intent classification: Trains a model to recognize user intents from text.
- Model training: Includes an epochs-based training loop with loss tracking.
- Prediction: Generates responses based on predicted intent.
- Notebook format: Implemented in a Jupyter Notebook (
ChatBot.ipynb) for clarity and reproducibility.
This project showcases my ability to:
- Translate product ideas into working ML prototypes.
- Structure and train simple Natural Language Processing (NLP) models.
- Document and share projects in a reproducible way.
- Consider next steps for scaling from demo to production.
- Python
- TensorFlow / Keras (for training)
- Numpy, Scikit-learn
- Jupyter Notebook
simple-ml-chatbot/
│
├── README.md # Project overview
├── requirements.txt # Dependencies
│
├── notebooks/ # Jupyter notebooks
│ └── ChatBot.ipynb
│
├── data/ # Training data (e.g., intents.json)
│ └── README.md
│
├── models/ # Saved model files after training
│ └── README.md
│
└── src/ # Source code scripts
└── README.md-
Clone the repository:
git clone https://github.com/juanocampo400/simple-ml-chatbot.git cd simple-ml-chatbot -
Install dependencies:
pip install -r requirements.txt
-
Download NLTK resources (run this once inside Python):
import nltk nltk.download('punkt') nltk.download('wordnet')
-
Open the notebook:
jupyter notebook ChatBot.ipynb
- Expand training data for better coverage.
- Add word embeddings for improved text understanding.
- Build a web app interface with Flask or FastAPI.
- Explore transformer-based models (e.g., BERT).
This is not a production system. It is intended as a demonstration of ML applied to conversational AI.