prashantAI/reality-divergence
0
Reality Divergence + Elsewhere
One shared reasoning engine, two lenses on the lives and worlds we didn't live.
- ๐ช Elsewhere (Your Timeline) โ a compassionate, safety-aware counterfactual reflection on a single personal choice. (Track: Backyard AI)
- ๐ Reality Divergence (The World) โ speculative alternate history: pin a divergence point, reason forward through plausible ripples. (Track: Thousand Token Wood)
Links
- ๐ฌ Demo video: https://youtu.be/cBzv7mwl_5E
- ๐ฃ Social post: https://www.linkedin.com/posts/prashant-kumar-96460963_reality-divergence-a-hugging-face-space-activity-7472308555153391616-0Ub1
Model rationale (Build Small)
- Reasoning: `Qwen/Qwen2.5-7B-Instruct` โ open weights, well under the 32B cap, served via the HF Inference API (
chat_completion). Configurable through theMODEL_NAME_TEXTenv var. - Rendering: the model returns structured JSON, rendered as an animated HTML timeline (glowing year-node spine, branch cards, reflection prompts).
- Atmosphere: each result is topped with a text-free cinematic image (`black-forest-labs/FLUX.1-schnell` via
text_to_image). Prompts explicitly forbid lettering, so no garbled "text" artifacts โ just mood. Degrades gracefully if image generation is unavailable. - No GPU required to run โ all inference goes through the Inference API, so the Space stays light and within Zero GPU limits.
Responsible UX
- Elsewhere runs input validation + risk detection and, on high-risk input, shows a safety notice with crisis resources instead of generating a timeline. Every timeline ends with an explicit return-to-actual-life strengths section.
- Reality Divergence is speculative and constrained to plausible, non-fantasy outcomes.
- The app degrades gracefully: model/timeout/JSON failures fall back to curated content so it never crashes.
Run locally
pip install -r requirements.txt
cp .env.example .env # then paste your HF token into .env
python app.pyGet a token at https://huggingface.co/settings/tokens (a Read token is enough). Without a valid token the app still runs and shows fallback content.
Submission checklist
- [x] Gradio Space, model under 32B, open weights
- [x] Dual-track UX (Backyard AI + Thousand Token Wood)
- [x] Safety gate + graceful fallback
- [x] Demo video link (see Links above)
- [x] Social media post link (see Links above)
Configuration reference: https://huggingface.co/docs/hub/spaces-config-reference
