Skip to content

urme-b/NovaVision

Repository files navigation

NovaVision

License: MIT Python 3.10+

Generate art based on how you're feeling. Type a sentence, and it detects the emotion, builds a visual prompt, and creates an image using FLUX.1.

Demo

Watch the demo

How it works

Text Input → Emotion Detection → Prompt Engineering → FLUX.1 Generation → Artwork
 "I feel     (HuggingFace       (emotion → visual    (diffusion model      (unique
  peaceful    Transformers)       style mapping)       via HF Inference)     image)
  today"

Supported emotions: joy, sadness, anger, fear, surprise, disgust, neutral — each mapped to different visual styles, color palettes, and artistic techniques.

Example

Input:  "The sunset made me feel completely at peace with the world"
→ Emotion: Joy (confidence: 0.94)
→ Generated prompt: warm golden light, serene landscape, soft brushstrokes...
→ Output: [serene landscape in warm golden tones with soft brushstrokes]

Quick start

git clone https://github.com/urme-b/NovaVision.git
cd NovaVision
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# Set up HuggingFace credentials
cp .env.example .env
# Edit .env with your HuggingFace API token

python server.py
# → http://localhost:8000

Requires: Python 3.10+, HuggingFace account with API token

API endpoints

Method Endpoint Description
POST /api/analyze Detect emotion from input text
POST /api/generate Full pipeline — detect emotion + generate artwork

Example request

curl -X POST http://localhost:8000/api/analyze \
  -H "Content-Type: application/json" \
  -d '{"text": "I feel so grateful for everything today"}'
{
  "success": true,
  "primary_emotion": "joy",
  "confidence": 92.0,
  "valence": 0.8,
  "arousal": 0.7
}

Repo structure

NovaVision/
├── src/
│   ├── models/            # Data schemas and type definitions
│   └── services/          # Emotion analysis and image generation
├── config/                # Application settings (Pydantic)
├── tests/                 # Unit and integration tests (pytest)
├── server.py              # Flask API server
├── app.py                 # Gradio web interface
├── index.html             # Single-page web app
└── requirements.txt

Tech Stack

Python · Flask · HuggingFace Transformers · FLUX.1 · Pydantic · Pytest · Docker

Testing

pytest tests/ -v

Roadmap

  • User authentication and gallery history
  • HuggingFace Spaces deployment for a public demo
  • Batch processing for multiple text inputs
  • Style customization (choose artistic influences)

License

MIT

About

Transform Emotions into AI-Generated Art — NLP emotion detection + FLUX.1 diffusion model image generation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors