A modern GUI application that converts natural language descriptions into TikZ diagrams using NVIDIA's LLaMA API. Create beautiful mathematical diagrams, flowcharts, and technical illustrations with simple text descriptions.
- Natural Language Generation: Describe your diagram in plain English
- Live Preview: See your diagrams update in real-time
- Code Editor: Built-in TikZ code editor with syntax highlighting
- Chat Interface: User-friendly chat-like interface for diagram requests
- Dark Theme: Modern, eye-friendly dark interface
- Install dependencies:
pip install -r requirements.txt-
Install LaTeX (if not already installed):
- macOS:
brew install texlive - Ubuntu:
sudo apt-get install texlive-full - Windows: Install MiKTeX from https://miktex.org/
- macOS:
-
Set up your API key:
- Create a
.envfile in the project root - Add your NVIDIA API key:
OPENAI_API_KEY=your-api-key
- Create a
-
Run the application:
python tikz_gui.py- Create a simple flowchart:
Create a flowchart with three boxes labeled 'Start', 'Process', and 'End', connected by arrows
- Draw a mathematical diagram:
Draw a right triangle with sides labeled 'a', 'b', and 'c', with a 90-degree angle marker
- Python 3.8+
- LaTeX distribution with TikZ package
- Required Python packages (see requirements.txt):
- customtkinter==5.2.1
- Pillow==10.1.0
- pdf2image==1.16.3
- openai==1.6.1
- python-dotenv==1.0.0
The application is structured into a single file for simplicity:
tikz_gui.py: Main application with UI components and TikZ rendering.env: Configuration file for API keysrequirements.txt: Python package dependencies
MIT License - Feel free to use and modify as needed.