CoolFace
Apppublic

yenk4/metaphoric-oracle

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
App README

๐Ÿ”ฎ 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

  1. 1.You answer 5 questions about your inner state (area of life, current energy, what you need, a symbol, an honest truth)
  2. 2.prompt_builder.py maps answers to visual imagery for a metaphoric card
  3. 3.Llama-3.1-8B-Instruct generates 4โ€“5 sentences of wise, empowering life advice grounded in your answers
  4. 4.FLUX.1-schnell generates a tarot-style card illustration
  5. 5.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, masterpiece

Tech stack

Python Gradio HuggingFace

  • โ€”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_TOKEN environment variable / Space secret

Run locally

bash
uv run python app.py

Or with plain Python:

bash
pip install -r requirements.txt
HF_TOKEN=your_token python app.py

Project 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.md

Built by Yana Makovskaya ยท Senior ML/AI Engineer ยท Generative AI