Transform Emotions into AI-Generated Art
NovaVision is an intelligent emotion-to-image application that analyzes text input to detect emotional content and generates stunning AI artwork that visually represents those emotions. It combines state-of-the-art NLP for emotion detection with cutting-edge diffusion models for image generation.
Real-time NLP-powered emotion detection as you type using a fine-tuned DistilRoBERTa model:
- Detects 7 emotions: Joy, Sadness, Anger, Fear, Surprise, Disgust, Neutral
- Displays confidence scores with animated progress bars
- Shows valence (positive/negative) and arousal (energy level) metrics
Intelligent detection system that differentiates between:
- Emotional inputs ("I feel peaceful") - Generates mood-inspired scenic artwork
- Object/scene inputs ("A majestic lion") - Generates exactly what you describe
- Automatically enhances prompts with quality modifiers and anti-watermark tokens
High-quality image generation using FLUX.1 diffusion models:
- FLUX.1-dev for premium quality (30 inference steps)
- Automatic fallback to FLUX.1-schnell for faster results
- 1024x1024 resolution output
- 5 style presets: Photorealistic, Artistic, Nature, Abstract, Dreamscape
- Download Options: Save images as PNG or full analysis reports
- Seed Control: Reproducible results with specific seeds
- Image History: Gallery of last 4 generated images
- Prompt Display: See how your input is transformed and enhanced
Click the preview above to watch the full 2-minute demo: entering a prompt, live emotion analysis, AI image generation, and prompt enhancement.
The clean generation interface with text input, style selection, and live emotion bars.
Real-time emotion detection showing confidence scores for all 7 emotions.
Detailed breakdown with primary emotion, valence, arousal, and confidence scores.
AI-generated artwork from the prompt "Excited about starting a new adventure" with live emotion bars.
Complete result showing the generated image alongside the enhanced prompt.
How NovaVision transforms your input into an optimized prompt with style and quality modifiers.
Three-step process: Express → Understand → Create.
Core capabilities: emotion detection, visual translation, and instant HD artwork.
"Cozy coffee shop on a rainy day" — generated with Sadness emotion detection via FLUX.1.
| Technology | Purpose | Details |
|---|---|---|
| Python 3.10+ | Backend runtime | Core application language |
| Flask | Web server | RESTful API endpoints |
| Gradio | Alternative UI | ML-focused web interface |
| HuggingFace Transformers | NLP | Emotion classification models |
| HuggingFace Inference API | Image Generation | Cloud-based model serving |
| FLUX.1-dev | Diffusion Model | High-quality image generation |
| DistilRoBERTa | Emotion Model | j-hartmann fine-tuned model |
| Pydantic | Validation | Data models and settings |
| Pillow | Image Processing | Image handling and conversion |
- Python 3.10 or higher
- HuggingFace account with API token
- Git
-
Clone the repository
git clone https://github.com/urme-b/NovaVision.git cd NovaVision -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
# Create .env file with your HuggingFace token echo "HF_TOKEN=your_huggingface_token_here" > .env
Get your token from: https://huggingface.co/settings/tokens
-
Run the application
python server.py
-
Open in browser
http://localhost:8000
- Enter your text: Describe how you're feeling or what you want to see
- Select a style: Choose from Artistic, Nature, Abstract, Dreamscape, or Photorealistic
- Click Generate: Watch as your emotions transform into art
- Explore results: View emotion analysis, download images, or regenerate
| Input Type | Example | Result |
|---|---|---|
| Emotional | "I feel peaceful watching the sunset" | Serene landscape inspired by tranquility |
| Emotional | "Excited about starting a new adventure" | Dynamic, energetic imagery |
| Object | "A majestic lion in the savanna" | Photorealistic lion image |
| Scene | "Cozy coffee shop on a rainy day" | Detailed coffee shop scene |
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Serve main HTML interface |
/api/analyze |
POST | Real-time emotion analysis |
/api/generate |
POST | Full generation pipeline |
# Emotion Analysis
curl -X POST http://localhost:8000/api/analyze \
-H "Content-Type: application/json" \
-d '{"text": "I feel happy today!"}'
# Image Generation
curl -X POST http://localhost:8000/api/generate \
-H "Content-Type: application/json" \
-d '{"text": "A peaceful morning", "style": "nature"}'This project showcases expertise in:
| Skill | Implementation |
|---|---|
| Machine Learning Integration | HuggingFace Transformers for emotion classification |
| API Development | RESTful API design with Flask |
| Prompt Engineering | Advanced techniques for image generation quality |
| Full-Stack Development | End-to-end application with Python backend + JS frontend |
| Modern Python | Type hints, dataclasses, Pydantic models |
| Software Architecture | Clean separation of concerns, service-based design |
| UX Design | Intuitive interface with loading states and error handling |
| Data Validation | Pydantic schemas for type safety |
Run the test suite to verify all components work correctly:
# Install pytest (if not already installed)
pip install pytest
# Run all tests
pytest tests/ -v
# Run specific test file
pytest tests/test_services.py -v- EmotionAnalyzer: 8 tests (emotion detection, valence, arousal, confidence)
- ImageGenerator: 2 tests (smart detection for emotional vs object inputs)
- Add more style presets and customization options
- Implement image-to-image generation for style transfer
- Add user authentication and generation history
- Deploy to HuggingFace Spaces for public demo
- Add batch processing for multiple generations
- Implement caching for faster subsequent generations








