ExplainGPT is a project that allows you to interact with language models, visualize token probabilities, and understand model behavior through an intuitive interface.
- Generate text using language models
- Visualize token probabilities for generated text
- Interactive playground for model exploration
- Model selection capability
- Token-by-token explanation of generated output
- Frontend: Next.js application with React 19 and Tailwind CSS
- Backend: FastAPI Python server that handles model loading and text generation
-
Navigate to the backend directory:
cd backend -
Sync dependencies using uv:
uv sync
-
Activate the virtual environment:
# If using standard venv source .venv/bin/activate # On Unix/macOS # OR .venv\Scripts\activate # On Windows
-
Run the FastAPI server:
fastapi dev main.py
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
bun install
-
Start the development server:
bun run dev
-
Access the application at http://localhost:3000
- Frontend: Next.js, React, Tailwind CSS, Radix UI
- Backend: FastAPI, PyTorch, Transformers
- Development: Bun, uv
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Anand Rajaram