β οΈ ALPHA VERSION - This application is currently in alpha. While functional, it may contain bugs and requires more testing. Use at your own discretion and please report any issues!
A cross-platform desktop AI chat application powered by Hugging Face Transformers for completely private, local AI inference. Chat with state-of-the-art LLMs, upload documents, and manage conversationsβall without sending data to external servers.
- Local Inference: Run AI models completely offline using Hugging Face Transformers
- No API Keys Required: Everything runs locally on your machine
- GPU & CPU Support: Automatic device detection with manual toggle
- Streaming Responses: Real-time token-by-token response generation
- 1000+ Models Available: Browse and download from Hugging Face's model hub
- Dynamic Model Browser: Browse 1000+ models from Hugging Face
- Task-Based Filtering: Filter models by task type (text-generation, translation, summarization, etc.)
- One-Click Downloads: Download models directly from the app
- Model Details: View size, parameters, downloads, likes, and tags before downloading
- Delete Models: Free up disk space by removing unwanted models
- Status Indicators: Green checkmarks show which models are already downloaded
- Multiple Conversations: Create and manage unlimited conversations
- Conversation History: All chats saved to local SQLite database
- Rename Conversations: Give your chats meaningful names
- Message Persistence: Never lose your conversation history
- File Upload: Upload PDF, Word (docx), and TXT files
- Document Parsing: Automatic extraction of text from documents
- Device Status Display: See if you're using GPU or CPU
- Visual Indicators: π’ Green (GPU active) | π‘ Yellow (CPU active) | π΄ Red (GPU unavailable)
- Easy Toggle: Switch between CPU and GPU with one click
- Automatic Detection: Detects CUDA-capable GPUs automatically
- CI/CD Pipeline: Automated builds and packaging
- Standalone Executables: PyInstaller packaging for Windows/Linux/macOS
- GitHub Releases: Automated release generation
- Code Signing: Signed binaries for macOS and Windows
- Model Quantization Support: Run larger models with less RAM (GGUF, 8-bit, 4-bit)
- Themes: Dark mode and custom themes
- Voice Input/Output: Speech-to-text and text-to-speech
- Multi-language UI: Internationalization support
- Image Generation: Support for text-to-image models (Stable Diffusion)
- More Tests: Comprehensive test coverage
- Performance Monitoring: Built-in profiling and optimization tools
- GUI Framework: PyQt6
- AI Framework: Hugging Face Transformers + PyTorch
- Model Source: Hugging Face Hub
- Document Parsing: PyMuPDF (PDF), python-docx (Word)
- Database: SQLite (local conversation storage)
- Device Support: CUDA (GPU) or CPU
- Python 3.8+ (Python 3.13+ recommended)
- Git (for cloning the repository)
- (Optional) CUDA: For GPU acceleration
-
Clone the repository:
git clone https://github.com/yourusername/ai-chat-app.git cd ai-chat-app -
Create virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
./run.sh # On Windows: python src/main.py -
Download your first model:
- Click "π₯ Browse Models" in the app
- Search for "Qwen/Qwen2.5-3B-Instruct" (small, fast, good quality)
- Click "Download Model"
- Wait for download to complete
- Start chatting!
- Click "+ New Conversation" in the left sidebar
- Select a downloaded model from the dropdown
- Type your message and press Send
- Watch the AI respond in real-time!
- Click "Upload File" button
- Select a PDF, Word, or TXT file
- The file appears as a badge above the input
- Type your question about the document
- The AI will use the document content in its response
- Click "π₯ Browse Models"
- Use the Task dropdown to filter models by type
- Search for specific models
- Click on a model to see details (size, parameters, downloads)
- Click "Download Model" to add it to your collection
- Downloaded models show with a β green checkmark
- Look at the top-right corner for device status
- π’ = GPU active, π‘ = CPU active
- Click "Switch to GPU/CPU" to change devices
- Confirm the switch in the dialog
- The model will be reloaded on the new device
ai-chat-app/
βββ src/ # Application source code
β βββ main.py # Application entry point
β βββ gui/
β β βββ main_window.py # Main application window
β β βββ model_browser.py # Model browser dialog
β βββ database/
β β βββ db_manager.py # SQLite conversation storage
β βββ models/
β β βββ huggingface_service.py # HF Transformers integration
β βββ parsers/
β βββ document_parser.py # PDF/Word/TXT parsers
βββ tests/ # Test files
β βββ test_setup.py # Dependency verification
β βββ test_components.py # Component tests
βββ scripts/ # Build & packaging
β βββ build.sh # Linux/macOS build script
β βββ build.bat # Windows build script
β βββ ai-chat.spec # PyInstaller config
βββ docs/ # Documentation
β βββ CHANGELOG.md # Version history
βββ requirements.txt # Python dependencies
βββ requirements-dev.txt # Development dependencies
βββ run.sh # Linux/macOS launcher
βββ README.md # This file
- No API Keys: All inference happens locally
- No Data Collection: Your conversations never leave your machine
- No Internet Required: After downloading models, works completely offline
- Local Database: All data stored in local SQLite database
- Open Source: Full transparencyβreview the code yourself
- Model downloads don't show detailed progress (only status messages)
- Very large models (70B+) may cause memory issues on systems with limited RAM
- First inference is slow due to model loading
- No model unloading between chats (keeps last model in memory)
- Device switching requires model reload
This is an alpha project and contributions are welcome! Please:
- 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
- Core functionality complete
- Bug fixes and stability improvements
- More comprehensive testing
- User feedback collection
- PyInstaller integration
- Automated build pipeline
- GitHub Actions CI/CD
- Signed executables
- Advanced model management (quantization, pruning)
- Export/import conversations
- Themes and customization
- Performance optimizations
- Multi-modal support (images, audio)
- Plugin architecture
- Cloud sync (optional)
This project is licensed under the MIT License - see the LICENSE file for details.
- Hugging Face for the amazing model hub and transformers library
- PyQt for the GUI framework
- PyTorch for the deep learning framework
- All the open-source model creators who make their work freely available
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: moez@rjiba.de
This is alpha software. While it works well for some use cases, it may contain bugs or unexpected behavior. The AI models downloaded are provided by third parties on Hugging Face. Please review model licenses and ensure you comply with them. AI-generated responses may be inaccurate, biased, or inappropriate. Use at your own discretion.
**Made with β€οΈ by Moez Rjiba
Star β this repo if you find it useful!