Transform your photos with AI-powered visual elements that match the mood and vibe of your favourite Spotify songs.
About:
A web app that analyses Spotify songs and uses AI to stylise your images, blending music and visual art in a unique, interactive way.
This app lets users upload an image and select a Spotify song. Using AI, it analyses the song's mood and transforms the image to visually match the song's emotional characteristics. The result: a personalised, music-inspired artwork.
- Image Upload: User uploads a photo.
- Song Search: User searches and selects a song from Spotify.
- Song Analysis: The backend fetches the song's mood, keywords, and vibe using Spotify's audio features and AI-powered analysis.
- Mood Mapping: These features are mapped to visual style prompts using a combination of AI and custom logic.
- AI Generation: Stable Diffusion (via Replicate) stylises the image based on the prompt.
- Result Display: Both original and stylised images are shown to the user.
- Next.js 14 (React, TypeScript)
- TailwindCSS (Styling)
- React Hook Form (Form handling)
- Axios (HTTP requests)
- FastAPI (Python 3.8+)
- Pillow (Image processing)
- python-multipart (File uploads)
- Spotipy (Spotify API integration)
- Replicate API (Stable Diffusion & Llama-2 for AI analysis)
- Requests (HTTP requests)
- OpenAPI/Swagger (Auto-generated docs)
- Upload any photo (JPEG, PNG, WebP, up to 10MB)
- Search and select songs from Spotify
- AI analyses song mood and generates visual prompts
- Stable Diffusion transforms the image
- Responsive, modern UI
- Side-by-side comparison of original and stylised images
- Real-time feedback and error handling
- The backend uses an AI model (Llama-2 via Replicate) to analyse the selected song and extract its mood, keywords, and a description.
- A custom prompt engineering function then translates these results into concrete visual elements (e.g., posters, lighting, decorations) that match the song's vibe.
- Special logic ensures that only appropriate elements are suggested (e.g., neon lights only for electronic genres, blue lighting for sad songs, etc.).
- The final style prompt is sent to Stable Diffusion (via Replicate) to generate the stylised image.
πββοΈ Built by Me β powered by Cursor