Skip to content

Aneesh-382005/Playground

Repository files navigation

Playground: Text-to-Manim

Turn a text prompt into a Manim animation video using LLM codegen.


Quickstart (Local)

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • Docker (for full parity with production)

1. Backend (FastAPI + Manim)

cd services
cd ..
python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
# Groq is the default provider. Add NVIDIA_API_KEY too if you want to try Gemma.
# Create a .env file in the project root with:
#   GROQ_API_KEY=...
#   NVIDIA_API_KEY=...
uvicorn services.api.main:app --reload

2. Frontend (Vite + React)

cd frontend
cp .env.example .env
# Edit VITE_API_BASE_URL in .env if backend is remote
npm install
npm run dev

Deploy to Render (Backend)

  1. Push your repo to GitHub.
  2. Go to render.com, create a new Web Service, connect your repo.
  3. Render will auto-detect render.yaml and build with Docker.
  4. Set GROQ_API_KEY in the Render dashboard.
  5. Optionally set NVIDIA_API_KEY if you want to use the NVIDIA provider.
  6. Deploy. Copy the backend URL (e.g., https://playground-xxxx.onrender.com).

Deploy to Vercel (Frontend)

  1. Import your repo in vercel.com.
  2. Set Root Directory to frontend.
  3. Set build command: npm run build, output: dist.
  4. Add env var: VITE_API_BASE_URL = your Render backend URL.
  5. Deploy.

Example Datasets for Finetuning


Troubleshooting

  • If the backend fails to render, check logs for LLM or Manim errors.
  • If the frontend can’t reach the backend, check CORS and VITE_API_BASE_URL.
  • For DNS issues, verify CNAME and Vercel domain status.

Credits

  • Built with FastAPI, Manim, React, Vite, Groq and NVIDIA providers, Qwen3-32B and Gemma 2 2B IT models.
  • See frontend/README.md for React/Vite details.

About

Turn text prompts into Manim animations using LLM code generation. React frontend, FastAPI backend, Groq (Qwen3-32B) for codegen, and Manim for rendering. This is a proof-of-concept for vizualizing algorithms and math concepts. Describe and Get a Video!

Topics

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors