Talk2Diagram is an innovative application that converts natural language descriptions into visual diagrams. It combines the power of language models with visualization tools to create dynamic and interactive diagrams based on user input.
- Natural language to diagram conversion
- Real-time diagram generation
- Interactive user interface
- Support for various diagram types
- Fast and responsive design
- React 18
- TypeScript
- Vite
- TailwindCSS
- Axios for API communication
- Python
- FastAPI
- Language Model Integration
- Manim for diagram generation
- Node.js (v16 or higher)
- Python 3.8 or higher
- npm package manager
- Clone the repository:
git clone [your-repository-url]
cd talk2diagram- Install frontend dependencies:
npm install- Start the development server:
npm run devThe frontend will be available at http://localhost:5173
- Navigate to the backend directory:
cd backend- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install backend dependencies:
pip install -r requirements.txt- Start the backend server:
uvicorn main:app --reload --host 0.0.0.0 --port 8000- As of now the project uses Ollama.
- Install Ollama and pull the model
deepseek-coder-v2:latestor any model of your choice ( coding specific ) - change the model name in
self.model = "deepseek-coder-v2:latest"underllm_service.pyfile
Must start the ollama server
ollama serveThe backend API will be available at http://localhost:8000
- Run development server:
npm run dev
The backend consists of several key components:
main.py: FastAPI application entry pointllm_service.py: Language model integrationmanim_service.py: Diagram generation servicemodels.py: Data models
Once the backend server is running, you can access the API documentation at:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some 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.
For support, please open an issue in the GitHub repository or contact the maintainers.