yenk4/metaphoric-oracle
0
๐ฎ Metaphoric Oracle
Answer 5 tarot-inspired questions โ LLM generates wise life advice โ FLUX paints your metaphoric card.
โถ๏ธ **Try it live on HuggingFace Spaces**
A creative demo combining LLM text generation + image generation with HuggingFace Inference API.
How it works
- You answer 5 questions about your inner state (area of life, current energy, what you need, a symbol, an honest truth)
prompt_builder.pymaps answers to visual imagery for a metaphoric card- Llama-3.1-8B-Instruct generates 4โ5 sentences of wise, empowering life advice grounded in your answers
- FLUX.1-schnell generates a tarot-style card illustration
- Both appear together as your personal reading
The oracle never predicts the future as good or bad โ only empowering, actionable guidance.
Example image prompt:
a mystical metaphoric card illustration, art nouveau style,
a blooming lotus rising from dark water, a chrysalis cracking open with golden light,
a lone flame burning in the dark, a full silver moon casting mystical shadows,
chains dissolving into luminous dust,
intricate ornate border with golden filigree and esoteric symbols,
jewel tones โ purple violet teal gold, ethereal atmosphere,
highly detailed spiritual illustration, tarot card format, masterpieceTech stack
- UI: Gradio
- Image model: FLUX.1-schnell (via HF Inference API)
- Text model: Llama-3.1-8B-Instruct (via HF Inference API)
- Hosting: HuggingFace Spaces (free)
- Auth:
HF_TOKENenvironment variable / Space secret
Run locally
uv run python app.pyOr with plain Python:
pip install -r requirements.txt
HF_TOKEN=your_token python app.pyProject structure
mood-to-portrait/
โโโ app.py # Gradio UI + inference calls (LLM + image)
โโโ prompt_builder.py # Maps oracle answers โ FLUX prompt
โโโ requirements.txt # gradio, huggingface_hub, Pillow
โโโ README.mdBuilt by Yana Makovskaya ยท Senior ML/AI Engineer ยท Generative AI
