Skip to content

ana-morais57/MindY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧘 MindY - Human-Centered Exploration of Mindfulness Content Discovery πŸŽ₯✨

MindY is a concept and exploration project that examines how people search for and engage with mindfulness and relaxation content. It uses natural language processing and information retrieval techniques as a lens to explore personalization, language, and user intent, rather than to deliver a production-ready wellness tool.

This project integrates YouTube metadata retrieval and natural language processing (NLP) with TF-IDF vectorization and cosine similarity to rank and recommend relevant relaxation and mindfulness content.


Context & Intent

MindY was developed as part of a learning journey focused on human-centered questions around content discovery. Its purpose is to explore how people search for and engage with mindfulness and relaxation content, rather than to deliver a production-ready tool.

The project focuses on experimentation, reflection, and design considerations, with attention to language, intent, and ethical use of technology in wellbeing contexts.


πŸ“‘ Table of Contents

  1. Project Overview
  2. Key Features
  3. How It Works
  4. Project Structure
  5. Requirements
  6. Usage
  7. Why This System?
  8. Next Steps

πŸ“– Project Overview

MindY consists of two core functionalities:

  1. 🧠 AI-Powered Chatbot for Personalized Techniques

    • Uses GPT-4 to generate actionable wellness techniques based on user queries.
    • Allows users to select wellness categories for more refined recommendations.
  2. πŸŽ₯ Intelligent YouTube Video Search

    • Retrieves relevant wellness videos from YouTube API.
    • Ranks videos by semantic similarity using TF-IDF & cosine similarity.
    • Ensures users get high-quality, meaningful video recommendations.

✨ Key Features

🎯 Personalized Recommendations

  • Uses GPT-4 to suggest specific techniques tailored to user queries.
  • Example: A query like "How can I reduce stress?" may generate:
    • Guided Breathing Exercise
    • Mindfulness Meditation for Anxiety Relief

πŸ” Smart Video Search

  • Queries YouTube API and ranks videos by similarity to the user's query.
  • Prevents generic recommendations by matching video descriptions to techniques.

πŸ“‚ Category-Based Suggestions

  • Users can select predefined wellness categories, such as:
    • 🧘 Mindfulness & Meditation
    • πŸ’¨ Breathing Exercises
    • 🀸 Somatic Practices

πŸ€” How It Works

Query Processing Pipeline

  1. πŸ’¬ User Input

    • The app collects a query (e.g., "How do I sleep better?").
    • If a category is selected, the response is focused on that domain.
  2. 🧠 AI Response Generation

    • GPT-4 generates a personalized list of techniques.
    • Extracts keywords and themes from the response.
  3. πŸ”— YouTube Search & Ranking

    • The system queries YouTube API for videos using refined keywords.
    • Uses TF-IDF & cosine similarity to re-rank videos based on relevance.
  4. πŸ“œ Results Display

    • The app presents AI-generated techniques alongside top-ranked videos.

πŸ“‚ Project Structure

Key Files & Directories

  • app.py β†’ Main Streamlit app (chatbot & video recommendations)
  • requirements/ β†’ Contains dependencies for different functionalities:
    • mindy_app.txt β†’ Dependencies for Streamlit app
    • genai.txt β†’ Dependencies for query simulation & clustering
    • nlp.txt β†’ Dependencies for data analysis
  • simulate_queries/ β†’ Query simulations & GPT data extraction
    • Contains the following key files:
      • app_logic.py: Implements core logic for GPT-4 recommendations, YouTube video fetching, ranking, and query processing.
      • simulate_queries.py: Automates the simulation of user queries using app_logic.py to extract GPT-recommended techniques and descriptions. Outputs results to simulation_results.csv.
  • data_analysis/ β†’ NLP analysis & clustering scripts:
    • Contains scripts for text preprocessing, clustering, and visualization of results.
    • Includes simulated_results.csv, which holds the output of simulated user queries for analysis.
  • MindyPresentation.pdf β†’ Project presentation
  • README.md β†’ Project documentation

βš™οΈ Requirements

  1. API Keys:

    • YouTube API Key (store your Key in a .env file as YOUTUBE_API_KEY).
    • OpenAI API Key (store your Key in the .env file as OPENAI_API_KEY).
  2. Dependencies:

    • Python libraries: streamlit, openai, scikit-learn, google-api-python-client, python-dotenv.
  3. Install Dependencies:

    • To keep dependencies isolated and avoid conflicts, create separate virtual environments for each functional area.

    🟒 MindY App (Streamlit)

    1. Create a virtual environment for the Streamlit app:
    python3 -m venv mindy_app_env
    source mindy_app_env/bin/activate  # On Windows, use mindy_app_env\Scripts\activate
    1. Install the dependencies:
    pip install -r requirements/mindy_requirements.txt

    🟑 Simulating Queries (GPT Data Extraction & Clustering)

    1. Create a virtual environment for query simulation and clustering:
    python3 -m venv genai_env
    source genai_env/bin/activate  # On Windows, use genai_env\Scripts\activate
    1. Install the dependencies:
    pip install -r requirements/genai.txt

    πŸ”΅ Data Analysis (Clustering & NLP Processing)

    1. Create a virtual environment for data analysis:
    python3 -m venv nlp_env
    source nlp_env/bin/activate  # On Windows, use nlp_env\Scripts\activate
    1. Install the dependencies:
    pip install -r requirements/nlp.txt

πŸš€ Usage

1️⃣ Run the Application

  • Activate the virtual environment for the MindY App:
source mindy_app.env/bin/activate  # On Windows: mindy_app.env\Scripts\activate
  • Launch the chatbot and video recommender:
streamlit run app.py

2️⃣ Input Queries

  • Enter a wellness-related query (e.g., "How can I improve my focus?").
  • Optionally, select a category for more refined suggestions.

3️⃣ View AI-Powered Recommendations

  • The app displays customized techniques & top-ranked YouTube videos.

❓ Why This System?

βœ… Traditional YouTube searches lack personalization.

This system improves recommendations by:

  • 🎯 Understanding query intent (semantic search, not just keywords).
  • πŸ› οΈ Filtering & ranking YouTube videos for better quality.
  • πŸ’‘ Providing AI-powered guidance, not just links.

πŸ› οΈ Next Steps

πŸš€ Integrate Clusters into GPT’s Workflow

  • Leverage clustered techniques to provide more cohesive recommendations.
  • Map user queries to cluster themes for more personalized outputs.

πŸ”§ Enhance Query Preprocessing

  • Improve text preprocessing by refining techniques like removing stop words and applying lemmatization.

🎯 Refine Prompt Design

  • Shift from a narrow focus on Mindfulness and Relaxation to a broader range of well-being areas.
  • Expand prompts to include diverse domains like emotional management and cognitive behavioral therapy (CBT).

πŸ“š Broaden Categories

  • Introduce new categories (e.g., journaling prompts) to generate more varied and meaningful recommendations.

πŸ’‘ Experiment with Free Models

  • Simulate queries using a generalized system, testing a free model like DeepSeek.

πŸ”„ Evaluate Clustering Impact

  • Repeat clustering processes and analyze how the new implementations influence results.

About

Personalized Search Assistant for Mindfulness and Relaxation Media

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors