CoolFace
Apppublic

prashantAI/reality-divergence

sourceHugging Facemitupdated 3mo agoView on Hugging Face
0likes
App README

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 the MODEL_NAME_TEXT env 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

bash
pip install -r requirements.txt
cp .env.example .env   # then paste your HF token into .env
python app.py

Get 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