StatEdu Slides Helper AI is a human-in-the-loop web app for building classroom-ready statistics slide decks from prompts and source materials (textbook excerpts, notes, and existing slides).
The app generates editable Quarto Reveal.js slides, renders live previews, supports iterative refinement, and keeps users in control with slide lock/approve controls.
- Prompt-to-deck generation for statistics lessons
- Multi-stage GenAI pipeline for quality:
web_researchtemplate_generationcontent_generation(one slide at a time)review_stagefact_check_stagecorrection_stageimage_generationrendering
- Source upload support (
.pdf,.pptx,.md,.txt, images) - Human-in-the-loop refine workflow
- Teaching style profiles:
balancedconceptualmathematicalsimulation
- Quarto
.qmdoutput with live preview - Auto-generated illustrative slide figures (
figures/*.svg) with subtle background integration - Audience-facing slide language (no presenter coaching text in visible slide body)
- Content structure emphasis per slide: definition, context, and student-useful materials
- R-enabled simulation/plot slides (e.g., histogram, scatter, cluster plot) for concept illustration
- Base-R-safe rendering path for generated
rChunkcode (auto-avoids missing tidyverse/ggplot dependencies) - Automatic dense-slide splitting into continuation slides to reduce overflow in preview/export
- In-app
.qmdediting with re-render - One-click deck bundle download (
.qmd+style.css+figures/as zip) - UI toggles for per-run
Think Depth(fast|standard|deep) andImage Style(auto|openai|local|none) - Slide-level protection during refine (
approve/lock) - Stage-aware progress tracking in workspace and cover page pipeline panel
- Research-first generation flow (Genspark-style): source upload + web findings -> template -> per-slide content generation -> review -> fact-check -> correction -> image generation -> render
- Optional video-style emulation cues from topic-relevant lesson videos (when discoverable via web research)
- Optional Google Slides export handshake endpoint
- Frontend: HTML, CSS, vanilla JavaScript
- Backend: Python (
http.server) - Rendering: Quarto CLI + Reveal.js
- LLM providers: OpenAI / Gemini / Anthropic (or fallback heuristic mode)
- Install Quarto CLI (optional but recommended for live render):
quarto --version- Set environment variables (example with OpenAI):
export STATEDU_LLM_PROVIDER=openai
export OPENAI_API_KEY=your_key_here
export STATEDU_OPENAI_MODEL=gpt-4.1-miniYou can also put these in a local .env file in the project root. server.py now auto-loads .env on startup (without overriding already-exported shell variables).
Start from .env.example and fill in your keys locally.
- Start server:
./server.py- Open:
http://127.0.0.1:8000
STATEDU_HOST(default:127.0.0.1)STATEDU_PORT(default:8000)STATEDU_LLM_PROVIDER(openai,gemini,anthropic,mock)STATEDU_OPENAI_MODEL/STATEDU_GEMINI_MODEL/STATEDU_ANTHROPIC_MODELSTATEDU_DEFAULT_THINK_DEPTH(fast,standard,deep; default:standard)STATEDU_LLM_TIMEOUT_SEC(default: unlimited; set to0,none, or leave unset)STATEDU_LLM_RETRY_COUNT(default:1, total attempts =1 + retry_count)STATEDU_LLM_RETRY_BACKOFF_SEC(default:1.2)STATEDU_DEFAULT_SLIDE_COUNT(default:8)STATEDU_MAX_SLIDE_COUNT(default:40)STATEDU_RENDER_STEP_DELAY_SEC(default:0.35)STATEDU_SLIDE_AUTO_SPLIT_ENABLED(1or0, default:1)STATEDU_R_CHUNK_AUTO_SPLIT_ENABLED(1or0, default:0; keep0to avoid splitting plotting code across slides)STATEDU_WEB_RESEARCH_ENABLED(1or0, default:1)STATEDU_WEB_RESEARCH_PROVIDER(auto,builtin,tavily,serpapi,hybrid; default:auto)STATEDU_WEB_RESEARCH_MAX_RESULTS(default:5)STATEDU_WEB_RESEARCH_TIMEOUT_SEC(default:6)STATEDU_TAVILY_API_KEY(optional; enables Tavily web search)STATEDU_SERPAPI_API_KEY(optional; enables Google results via SerpAPI)STATEDU_YOUTUBE_API_KEY(optional; enables YouTube Data API search for style cues)STATEDU_WEB_RESEARCH_PREFERRED_DOMAINS(comma-separated domains for ranking source priority)STATEDU_VIDEO_RESEARCH_ENABLED(1or0, default:1)STATEDU_VIDEO_RESEARCH_MAX_RESULTS(default:2)STATEDU_IMAGE_GENERATION_ENABLED(1or0, default:1)STATEDU_IMAGE_PROVIDER(auto,local,openai,none; default:auto)STATEDU_IMAGE_MAX_SLIDES(default:12)STATEDU_IMAGE_STYLE_PROMPT(style hint for generated visuals)STATEDU_OPENAI_IMAGE_MODEL(default:gpt-image-1)STATEDU_OPENAI_IMAGE_SIZE(default:1536x1024)
- Keep API keys in environment variables only.
- Generated artifacts are stored under
.statedu/and are git-ignored by default. - Without
STATEDU_TAVILY_API_KEYorSTATEDU_SERPAPI_API_KEY, web research falls back to built-in sources (DuckDuckGo Instant + Wikipedia + YouTube feed).