Skip to content

The chatbot mimics real-world conversational assistants and was structured around a customized prompt template and memory chain.

Notifications You must be signed in to change notification settings

codebyArya-bit/Conversational-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TechEdu Hub - AI-Powered Educational Chatbot πŸŽ“

A comprehensive web platform that combines IT support, educational resources, and an intelligent AI chatbot to help students with technical issues and academic questions.

TechEdu Hub Flask AI License

🌟 Features

  • πŸ€– AI-Powered Chatbot: Intelligent assistant using sentence transformers and FAISS for semantic search
  • πŸ“š Educational Resources: Comprehensive learning materials covering networking, databases, programming, and cybersecurity
  • 🎨 Modern UI/UX: Responsive design with smooth animations and intuitive navigation
  • ⚑ Real-time Chat: Interactive chatbot with typing indicators and quick question buttons
  • πŸ“± Mobile Responsive: Optimized for all devices and screen sizes
  • πŸ” Semantic Search: Advanced FAQ matching using machine learning embeddings
  • 🎯 Student-Focused: Designed specifically for educational environments

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/techedu-hub.git
    cd techedu-hub
  2. Create a virtual environment

    python -m venv venv
  3. Activate the virtual environment

    Windows:

    venv\Scripts\activate

    macOS/Linux:

    source venv/bin/activate
  4. Install dependencies

    pip install -r requirements.txt
  5. Set up environment variables

    # Copy the example environment file
    cp .env.example .env
    
    # Edit .env file and add your OpenAI API key (optional for demo)
    OPENAI_API_KEY=your_openai_api_key_here
  6. Run the application

    python run.py
  7. Access the application

    Open your browser and navigate to: http://localhost:5000

πŸ“ Project Structure

techedu-hub/
β”œβ”€β”€ app.py                 # Main Flask application
β”œβ”€β”€ run.py                 # Application runner
β”œβ”€β”€ config.py              # Configuration settings
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ .env.example          # Environment variables template
β”œβ”€β”€ .gitignore            # Git ignore rules
β”œβ”€β”€ README.md             # Project documentation
β”œβ”€β”€ templates/            # HTML templates
β”‚   β”œβ”€β”€ index.html        # Homepage
β”‚   β”œβ”€β”€ about.html        # About page
β”‚   β”œβ”€β”€ services.html     # Services page
β”‚   β”œβ”€β”€ resources.html    # Resources page
β”‚   └── contact.html      # Contact page
β”œβ”€β”€ .cache/               # Cached embeddings and data
β”‚   β”œβ”€β”€ faq_embeddings.npy
β”‚   └── faq_questions.json
└── ICT Cell Common problems - Hardware issues.csv  # FAQ dataset

πŸ› οΈ Technology Stack

  • Backend: Flask (Python web framework)
  • AI/ML:
    • Sentence Transformers (for text embeddings)
    • FAISS (for similarity search)
    • OpenAI API (optional integration)
  • Frontend:
    • HTML5, CSS3, JavaScript
    • Font Awesome icons
    • Google Fonts
  • Data Processing: Pandas, NumPy
  • Environment: Python-dotenv for configuration

πŸ”§ Configuration

Environment Variables

Create a .env file in the root directory:

# OpenAI API Key (optional - for enhanced AI responses)
OPENAI_API_KEY=your_api_key_here

# Flask Configuration
FLASK_ENV=development
FLASK_DEBUG=True

FAQ Dataset

The application uses ICT Cell Common problems - Hardware issues.csv for the knowledge base. You can:

  • Replace this file with your own FAQ dataset
  • Ensure the CSV has columns for questions and answers
  • The system will automatically generate embeddings for semantic search

🎯 Usage

For Students

  1. Homepage: Browse educational content and features
  2. AI Assistant: Click "Try AI Assistant" to start chatting
  3. Quick Questions: Use pre-defined buttons for common issues
  4. Learning Resources: Explore theories and educational materials
  5. Navigation: Use the top menu to access different sections

For Developers

  1. API Endpoints:

    • POST /api/chat - Send messages to the chatbot
    • GET / - Homepage
    • GET /about - About page
    • GET /services - Services page
    • GET /resources - Resources page
    • GET /contact - Contact page
  2. Customization:

    • Modify templates in the templates/ directory
    • Update FAQ data in the CSV file
    • Customize styling in the HTML templates
    • Add new routes in app.py

πŸš€ Deployment

Local Development

# Run with debug mode
python run.py

# Or use Flask CLI
flask --app app run --debug

Production Deployment

  1. Using Gunicorn (recommended for production):

    pip install gunicorn
    gunicorn -w 4 -b 0.0.0.0:5000 app:app
  2. Using Docker (create Dockerfile):

    FROM python:3.9-slim
    WORKDIR /app
    COPY requirements.txt .
    RUN pip install -r requirements.txt
    COPY . .
    EXPOSE 5000
    CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:app"]

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Troubleshooting

Common Issues

  1. Import Errors:

    • Ensure virtual environment is activated
    • Install all dependencies: pip install -r requirements.txt
  2. Port Already in Use:

    • Change port in run.py or kill the process using port 5000
  3. Missing Dependencies:

    • Update pip: python -m pip install --upgrade pip
    • Reinstall requirements: pip install -r requirements.txt --force-reinstall
  4. Slow Initial Load:

    • First run downloads ML models (sentence transformers)
    • Subsequent runs will be faster due to caching

Performance Optimization

  • The application caches embeddings in .cache/ directory
  • First-time setup may take longer due to model downloads
  • Consider using a production WSGI server for better performance

πŸ“ž Support

For support and questions:

  • Create an issue on GitHub
  • Check the troubleshooting section
  • Review the documentation

πŸ™ Acknowledgments

  • Sentence Transformers for semantic search capabilities
  • FAISS for efficient similarity search
  • Flask community for the excellent web framework
  • Font Awesome for beautiful icons
  • Google Fonts for typography

Made with ❀️ for students and educators

TechEdu Hub - Empowering learning through AI and technology

About

The chatbot mimics real-world conversational assistants and was structured around a customized prompt template and memory chain.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published