Feel it. Find it. Play it.
Moodify AI reads how you're feeling from a few sentences of plain text and recommends a playlist to match — powered by a custom-trained emotion classifier and Last.fm's music catalog.
🔗 Live demo: moodifyai-feel-it-find-it.vercel.app
- You type how you're feeling into the Detector.
- The text is embedded using
sentence-transformers(all-MiniLM-L6-v2) and classified into one of six moods by aLogisticRegressionmodel trained on the GoEmotions dataset. - The detected mood is mapped to genre tags, which are sent to the Last.fm API to pull matching tracks.
- Duplicate tracks are filtered out, the list is shuffled, and the top 10 songs are returned and rendered as a playlist.
Moods detected: Happy, Sad, Angry, Calm, Romantic, Anxious
Frontend
- React (Vite)
- Custom scroll-driven scene architecture — a shared
ScrollContext+ scroll-progress hook drives section transitions with plain JS math (no GSAP/Lenis/animation libraries) - Vanilla CSS
Backend
- FastAPI
sentence-transformersfor text embeddingsscikit-learn(LogisticRegression) for mood classification, persisted withjoblib- Last.fm API for track recommendations
- Deployed on Hugging Face Spaces (Docker SDK)
moodify-ai/
├── frontend/
│ ├── src/
│ │ ├── App.jsx # Scene layout + nav dots
│ │ ├── ScrollContext.jsx # Shared scroll progress provider
│ │ ├── useScrollProgress.js # clamp / remap / lerp helpers
│ │ ├── components/
│ │ │ ├── Navbar.jsx
│ │ │ ├── Hero.jsx
│ │ │ ├── MoodsSection.jsx # Auto-playing mood carousel
│ │ │ ├── Detector.jsx # Text input → mood + playlist
│ │ │ └── AboutFooter.jsx
│ │ ├── assets/images/ # Mood GIFs
│ │ ├── index.css
│ │ └── main.jsx
│ └── package.json
│
└── backend/
├── main.py # FastAPI app (/detect-mood, /recommendations)
├── emotion_song_model.pkl # Trained classifier
├── calm_sentences.txt # Extra training data (class imbalance fix)
├── requirements.txt
├── Dockerfile
└── README.md # Hugging Face Spaces config
cd backend
pip install -r requirements.txtCreate a .env file:
LASTFM_API_KEY=your_lastfm_api_key
Run the server:
uvicorn main:app --reload --port 7860cd frontend
npm install
npm run devUpdate the backend URL in Detector.jsx if you're not using the deployed Hugging Face endpoint.
Request
{ "text": "I can't stop smiling today" }Response
{
"mood": "happy",
"songs": [
{ "name": "...", "artist": "...", "url": "..." }
]
}Returns just the predicted mood for a given text, without song recommendations.
- Backend — Hugging Face Spaces (Docker SDK), exposed on port
7860. Seebackend/Dockerfile. - Frontend — Vercel.
Built by Samidha
I believe music should meet you where you are, not where an algorithm thinks you should be.