--- title: GitHub Graphics Generator emoji: 🎨 colorFrom: blue colorTo: purple sdk: gradio sdk_version: 6.2.0 app_file: app.py pinned: false license: mit --- # 🎨 GitHub Graphics Generator Generate clean, professional graphics for GitHub repositories using a hybrid approach: AI-generated visual backgrounds combined with deterministic text and layout rendering. This ensures readable text, accurate stats, and consistent design. --- ## Features ### 🔹 Input Modes - **GitHub Repository URL** - **README / Free Text Prompt** - **Screenshot / Image-to-Image** ### 🔹 AI Background Generation - Text-to-Image and Image-to-Image via Hugging Face Inference API - Style-driven prompts (Modern, Minimal, Professional) - Custom color schemes ### 🔹 Deterministic Layout - Project name - Description - Stars / forks - Primary language Rendered using PIL (not AI hallucination) ### 🔹 Advanced Prompt Controls - Custom prompt override - Negative prompt (e.g. *blurry, watermark, distorted*) ### 🔹 Export - High-quality PNG - One-click download --- ## How It Works | Component | Responsibility | |---------|----------------| | AI Model | Visual style & background | | PIL | Text, stats, layout | | GitHub API | Repository metadata | | Gradio | Interactive UI | This avoids common AI issues with text rendering and layout precision. --- ## Supported Models - `stabilityai/stable-diffusion-xl-base-1.0` - `runwayml/stable-diffusion-v1-5` Only models compatible with the Hugging Face **Inference API** are used. --- ## Environment Variables Optional but recommended: ```env HUGGINGFACE_TOKEN=hf_xxxxxxxxx Provides higher rate limits and access to gated models. ⸻ Known Limitations (Intentional) • No manual step / CFG sliders (Inference API controlled) • AI does not render text or logos • Diffusers-only models (e.g. SDXL-Lightning) are not used ⸻ License MIT