This project leverages AI to recommend yoga routines based on the user's mood. By analyzing mood descriptions using NLP and sentiment analysis, the system identifies the sentiment (positive, negative, neutral) and provides tailored yoga recommendations to enhance the user's well-being.
- Mood Analysis: Extract sentiment from user input using Hugging Face's transformer models.
- Personalized Yoga Recommendations: Suggests yoga routines based on detected sentiment and a curated dataset.
- Scalable Architecture: Built with Flask for backend and React for frontend, enabling integration into apps or websites.
The dataset contains various recommendations of mood descriptions, their corresponding sentiment labels, and yoga recommendations. It covers a wide range of emotions and associated yoga practices for diversity and relevance.
Mood Text | Sentiment Label | Yoga Recommendation |
---|---|---|
I feel great and energized. | POSITIVE | Morning Stretch Flow, Sun Salutations |
I’m stressed and overwhelmed at work. | NEGATIVE | Relaxation Yoga, Deep Breathing Exercise |
I feel okay, nothing special today. | NEUTRAL | Beginner Yoga Routine, Balance Yoga Sequence |
The goal is to recommend yoga routines that match the user's emotional state, improving their wellness through personalized suggestions.
- Dataset created with diverse mood examples and associated yoga recommendations.
- Preprocessed user mood input using CountVectorizer for cosine similarity matching.
- Hugging Face's pre-trained sentiment analysis model is used for NLP.
- Cosine similarity calculates the closest mood match from the dataset when sentiment alone isn't sufficient.
- Flask API handles sentiment analysis and dataset-based recommendations.
- Handles requests with CORS for frontend compatibility.
- React-based interface for user-friendly interaction.
- Users can input their mood and view recommended yoga routines dynamically.
- Clone the repository:
git clone https://github.com/snehaapratap/mood-based-yoga-recommender.git
- Navigate to the backend folder:
cd mood-based-yoga-recommender/backend
- Run the Flask app:
python app.py
- Navigate to the frontend folder:
cd frontend/mood-based-yoga-recommender
- Install dependencies:
npm install
- Start the React app:
npm start
- Input Mood: The user inputs a mood description via the frontend.
- Sentiment Analysis: The backend identifies the sentiment (positive, negative, or neutral).
- Yoga Recommendation:
- If sentiment matches directly, a predefined recommendation is provided.
- If no direct match, cosine similarity finds the closest mood from the dataset.
- Result Display: Recommendations are displayed on the frontend.
- Accuracy: Sentiment analysis accurately identifies the mood category for diverse inputs.
- Efficiency: Recommendations are delivered in real-time with minimal latency.
- Expand Dataset: Incorporate user feedback to improve and expand the dataset.
- Advanced Recommendations: Include multimedia (images/videos) for suggested routines.
- Deployment: Host the app on AWS or Heroku for public accessibility.
A video demonstration showcasing:
- User interaction on the frontend.
- Mood analysis and yoga recommendation in action.
For queries or suggestions:
- Name: Sneha P Pratap
- Email: [email protected]
- GitHub: snehaapratap
Contributions are welcome! Feel free to fork the repository and submit pull requests.