A smart chatbot implementation designed for Centurion University of Technology and Management (CUTM). This project serves as an intelligent virtual assistant to help students, faculty, and visitors with university-related queries. Built using PyTorch and deployed with Flask and JavaScript, this chatbot demonstrates the practical application of AI in enhancing university communication systems.
CUTM CHATBOT is a college project developed for Centurion University of Technology and Management. It's designed to:
- Assist with common university-related queries
- Provide information about courses and programs
- Help with administrative questions
- Guide visitors through university resources
- Support students with general inquiries
- Custom neural network implementation using PyTorch
- Natural Language Processing with NLTK
- Multiple deployment options:
- Integrated Flask application with Jinja2 templates
- Standalone REST API with separate frontend
- Real-time chat interface with JavaScript
- Customizable intents and responses specific to CUTM
- Easy-to-modify architecture
- Complete integration with Flask
- Server-side rendering using Jinja2 templates
- All-in-one solution
- Separate frontend and backend
- Flask serves only as REST API
- Frontend can be integrated into any application
- Greater flexibility and scalability
- Python 3.7+
- Basic knowledge of Python, Flask, and JavaScript
- Understanding of REST APIs
- Familiarity with PyTorch (optional)
- Clone the repository:
git clone https://github.com/maheshmm7/CUTM-Chatbot.git
cd CUTM-Chatbot- Create and activate virtual environment:
# On Windows
python -m venv venv
.\venv\Scripts\activate
# On macOS/Linux
python3 -m venv venv
source venv/bin/activate- Install required packages:
pip install Flask torch torchvision nltk- Install NLTK data:
python
>>> import nltk
>>> nltk.download('punkt')- The chatbot comes pre-configured with CUTM-specific intents in
intents.json:
{
"intents": [
{
"tag": "greeting",
"patterns": ["Hi", "Hello", "Hey"],
"responses": ["Hello! Welcome to CUTM Chatbot!", "Hi there! How can I help you with CUTM related queries?", "Hey! Ask me anything about Centurion University!"]
},
{
"tag": "courses",
"patterns": ["What courses are offered?", "Tell me about programs", "Available degrees"],
"responses": ["CUTM offers various undergraduate and postgraduate programs in Engineering, Management, Pharmacy, and more. Would you like specific information about any program?"]
}
]
}- Train the model:
python train.py- Verify the training by testing in console:
python chat.pypython app.pyVisit http://localhost:5000 in your browser.
python app.py --api-onlyThe API will be available at http://localhost:5000/predict.
- URL:
/predict - Method:
POST - Content-Type:
application/json - Request Body:
{
"message": "Tell me about CUTM"
}- Response:
{
"answer": "Centurion University of Technology and Management is a premier educational institution focused on skill-integrated education."
}- Add new patterns and responses to
intents.json - Retrain the model using
train.py - Restart the Flask application
Edit model.py to customize the neural network architecture:
- Adjust layer sizes
- Modify activation functions
- Add or remove layers
- Fork the repository
- Create a new branch (
git checkout -b feature/improvement) - Make changes
- Commit (
git commit -am 'Add new feature') - Push (
git push origin feature/improvement) - Create a Pull Request
Common issues and solutions:
-
Model not loading:
- Ensure
data.pthexists - Verify PyTorch version compatibility
- Ensure
-
NLTK errors:
- Run
nltk.download('punkt')in Python console - Check NLTK installation
- Run
-
Flask application not starting:
- Verify virtual environment is activated
- Check port 5000 is available
This project is licensed under the MIT License - see the LICENSE file for details.
- Centurion University of Technology and Management
- Faculty mentors and guides
- Original PyTorch chatbot tutorial
- Flask documentation
- NLTK community
- PyTorch team
For questions and support about CUTM CHATBOT, please open an issue in the GitHub repository or contact the development team at Centurion University of Technology and Management.