Commit History
10 days ago
-
Fix ZeroGPU startup by launching through Gradio
anttiluodeServe game routes through launch app_kwargs while preserving the Gradio API and disabling SSR. Add HTTP regression coverage for the startup hook, game assets, narration stream, and image response.16f2c5c -
Mount Gradio at the root so ZeroGPU can find the @spaces.GPU functions
Claude +1: Claude Sonnet 5.5Unverified signatureStarting worked (uvicorn on 7860) but the Space was stopped right after, and the earlier error was 'No @spaces.GPU function detected during startup'. Gradio was mounted under /gradio, where HF's ZeroGPU detection (best guess) does not look. Now the game's files are plain routes registered first, and Gradio is mounted at / so /config and /gradio_api are at the root; the page calls gradio_api/call/.... Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Eg7PDh5Nquz9zWpYMKwZBv5481594 -
Life² as a Hugging Face Space: game page + Gradio narrate/paint endpoints
Claude +1: Claude Opus 5.5Unverified signatureFastAPI serves the Life2 page at /, /space-config, and a Gradio API at /gradio with narrate (streamed, prompt built server-side from the fact sheet) and paint (prompt must use only the game's own vocabulary). ZeroGPU: Qwen2.5-7B + SDXL-Turbo with the fp16-safe VAE; CPU: Qwen2.5-1.5B + SD-Turbo. LIFE2_MOCK=1 for testing without models. Workflow mirrors pushes to the Space once HF_TOKEN and HF_SPACE are set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Eg7PDh5Nquz9zWpYMKwZBv510a1f1