Resonate with your mood with MoodSync, an emotion-based YouTube video recommender.
MoodSync is a Python application that leverages Deepface and ThreadExecutorPool libraries to detect the user's emotion in real-time. It recommends YouTube videos based on the detected emotion, providing a personalized and engaging content experience.
For a detailed execution flow, refer to the Execution Flow Diagram.
├── src
│ ├── data
│ │ ├── models
│ │ │ ├── emotion.py
│ │ │ ├── video.py
│ │ ├── emotion_detector.py
│ │ ├── videos.py
│ │ ├── youtube.py
│ ├── domain
│ │ ├── video_service.py
│ ├── presenter
│ │ ├── init.py
│ │ ├── app.py
│ │ ├── home.py
│ │ ├── request_executor.py
-
Emotion Detector: Runs on a separate thread to capture frames and detect the user's emotion using Deepface and ThreadExecutorPool.
-
Presenter Layer: Consists of a UI and a request executor. The UI passes emotion stats to the request executor, which maintains a queue for normalization and ensures smooth UI transitions.
-
Domain Layer - Video Service: Responsible for querying local SQLite databases for videos based on emotions. If videos are not present, it utilizes the YouTube Data API to fetch relevant content.
- Youtube Client: Makes calls to YouTube Data API v3, converting received videos into Python classes.
- SQLite3 Client: Performs CRUD operations on the local SQLite database.
- Clone the repository.
- Install the required dependencies using
pip install -r requirements.txt
. - Run
python src/app.py
to launch MoodSync.
Contributions are welcome! Feel free to open issues or submit pull requests.