Skip to content

Abbilaash/SnapClass.EXE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ SnapClass.AI - AI-Powered Educational Assistant

SnapClass.AI is a fully Offline intelligent educational platform that combines multiple AI models to process, analyze, and generate educational content from various input sources including audio, PDFs, and text.

πŸ—οΈ Project Architecture

SnapClass/
β”œβ”€β”€ πŸ“ server/                    # Main application backend
β”‚   β”œβ”€β”€ πŸš€ desktop_app.py        # Main GUI application (PyQt5/Tkinter)
β”‚   β”œβ”€β”€ 🌐 app.py                # Flask web server
|   β”œβ”€β”€ 🌐 desktop_app.py
|   β”œβ”€β”€ 🌐 chat.py
β”‚   β”œβ”€β”€ πŸ”„ trans.py              # Main processing orchestrator
β”‚   β”œβ”€β”€ 🎀 stt.py                # Speech-to-Text (Whisper)
β”‚   β”œβ”€β”€ πŸ“„ pdf_reader.py         # PDF processing (Nougat + BLIP)
β”‚   β”œβ”€β”€ ❓ question_gen.py        # Question generation (LLaMA)
β”‚   β”œβ”€β”€ πŸ“Š slm_analyse.py        # Student analysis (LLaMA)
β”‚   β”œβ”€β”€ πŸ› οΈ utils.py              # Utility functions
β”‚   β”œβ”€β”€ βš™οΈ setup.py              # Model downloader
β”‚   β”œβ”€β”€ πŸ“ templates/            # HTML templates
β”‚   β”œβ”€β”€ 🎨 static/               # CSS/JS assets
β”‚   β”œβ”€β”€ πŸ“ uploads/              # User file uploads
β”‚   └── πŸ“ output/               # Processed results
β”‚   β”œβ”€β”€ πŸ“ llama3/               # LLaMA 3.2 3B model
β”‚   β”‚   β”œβ”€β”€ genie-t2t-run.exe    # Genie inference engine
β”‚   β”‚   β”œβ”€β”€ genie_config.json    # Model configuration
β”‚   β”‚   β”œβ”€β”€ *.bin                # Model weights (3 parts)
β”‚   β”‚   └── *.dll                # Windows dependencies
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“ whisper/              # OpenAI Whisper model
β”‚   β”‚   β”œβ”€β”€ model.safetensors    # Speech recognition model
β”‚   β”‚   β”œβ”€β”€ tokenizer.json       # Tokenizer
β”‚   β”‚   └── config.json          # Model configuration
β”‚   β”‚
β”‚   └── πŸ“ poppler/              # PDF processing utilities
β”‚
└── πŸ“‹ requirements.txt           # Python dependencies

πŸš€ Key Features

🎯 Multi-Modal AI Processing

  • Audio Processing: Speech-to-text conversion using Whisper
  • Document Processing: PDF text extraction module
  • Text Generation: Question generation and analysis using LLaMA 3.2

πŸ–₯️ Dual Interface

  • Desktop Application: Native GUI built with customtkinter
  • Web Interface: Flask-based web server with React frontend

πŸ”„ Workflow Pipeline

  1. Input Processing: Audio files, PDFs, or text input
  2. AI Analysis: Multi-model AI processing pipeline
  3. Content Generation: Questions, summaries, and insights
  4. Output Delivery: Structured results via GUI or web interface

πŸ› οΈ Technology Stack

Backend (Python)

  • Framework: Flask (web server)
  • GUI: customtkinter (desktop app)
  • AI/ML: PyTorch, Transformers, Whisper, Llama3.2
  • Audio: librosa, soundfile
  • PDF: pytesseract, pypdf
  • Data: numpy, PIL, PyYAML

AI Models

  • LLaMA 3.2 3B: Text generation and analysis
  • Whisper: Speech-to-text transcription

πŸ“‹ Prerequisites

System Requirements

  • OS: Windows 10/11, macOS, or Linux
  • Processor: Snapdragon X Elite
  • RAM: Minimum 8GB, Recommended 16GB+
  • Storage: 10GB+ free space for models
  • GPU: Optional but recommended for faster inference

Software Requirements

  • Python: 3.8 - 3.11
  • Git: For version control

πŸš€ Installation & Setup

1. Clone Repository

git clone https://github.com/YOUR_USERNAME/SnapClass.git
cd SnapClass

2. Python Environment Setup

# Create virtual environment
python -m venv venv

# Activate virtual environment
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

3. Model Setup

# Navigate to server directory
cd server

# Download and setup AI models
python setup.py

Dwonload NPU optimised Llama3.2 model Click here Download poppler from here Note: This will download ~5GB of AI models. Ensure stable internet connection.

🎯 Usage

Desktop Application

cd server
python desktop_app.py

πŸ”§ Configuration

Model Configuration

  • LLaMA: Edit server/llama3/genie_config.json
  • Whisper: Configure in server/whisper/config.json
  • Nougat: Settings in server/nougat/config.json
  • BLIP: Options in server/blip/config.json

πŸ“¦ Building Executable and Msix

Using PyInstaller

# Use MSIX build script
.\build.ps1 -Version "1.0.0.0" -Publisher "CN=SnapClass.A"

πŸ› Troubleshooting

Model Loading Errors

# Verify model files exist
ls -la server/llama3/
ls -la server/whisper/

Memory Issues

  • Reduce batch sizes in model configurations
  • Use CPU-only inference for lower memory usage
  • Close other applications to free RAM
  • Check the availability of Snapdragon NPU

Import Errors

# Reinstall dependencies
pip uninstall -r requirements.txt
pip install -r requirements.txt

Performance Optimization

  • GPU Acceleration: Install CUDA-enabled PyTorch
  • Model Quantization: Use quantized models for faster inference
  • Batch Processing: Process multiple files simultaneously

🀝 Contributing

Development Setup

  1. Fork the repository
  2. Create feature branch: git checkout -b feature-name
  3. Make changes and test thoroughly
  4. Commit: git commit -m 'Add feature'
  5. Push: git push origin feature-name
  6. Create Pull Request

Code Style

  • Python: Follow PEP 8 guidelines
  • Documentation: Update README for new features

πŸ“„ License

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

πŸ™ Acknowledgments

  • Meta AI: LLaMA 3.2 model
  • OpenAI: Whisper speech recognition
  • Open Source Community: Various libraries and tools

πŸ“ž Support

Made with ❀️ for the educational community

About

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors