A comprehensive web platform that combines IT support, educational resources, and an intelligent AI chatbot to help students with technical issues and academic questions.
- π€ 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
- Python 3.8 or higher
- pip (Python package installer)
- Git
-
Clone the repository
git clone https://github.com/yourusername/techedu-hub.git cd techedu-hub
-
Create a virtual environment
python -m venv venv
-
Activate the virtual environment
Windows:
venv\Scripts\activate
macOS/Linux:
source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
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
-
Run the application
python run.py
-
Access the application
Open your browser and navigate to:
http://localhost:5000
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
- 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
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
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
- Homepage: Browse educational content and features
- AI Assistant: Click "Try AI Assistant" to start chatting
- Quick Questions: Use pre-defined buttons for common issues
- Learning Resources: Explore theories and educational materials
- Navigation: Use the top menu to access different sections
-
API Endpoints:
POST /api/chat
- Send messages to the chatbotGET /
- HomepageGET /about
- About pageGET /services
- Services pageGET /resources
- Resources pageGET /contact
- Contact page
-
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
- Modify templates in the
# Run with debug mode
python run.py
# Or use Flask CLI
flask --app app run --debug
-
Using Gunicorn (recommended for production):
pip install gunicorn gunicorn -w 4 -b 0.0.0.0:5000 app:app
-
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"]
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
-
Import Errors:
- Ensure virtual environment is activated
- Install all dependencies:
pip install -r requirements.txt
-
Port Already in Use:
- Change port in
run.py
or kill the process using port 5000
- Change port in
-
Missing Dependencies:
- Update pip:
python -m pip install --upgrade pip
- Reinstall requirements:
pip install -r requirements.txt --force-reinstall
- Update pip:
-
Slow Initial Load:
- First run downloads ML models (sentence transformers)
- Subsequent runs will be faster due to caching
- 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
For support and questions:
- Create an issue on GitHub
- Check the troubleshooting section
- Review the documentation
- 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