Analyze emotions from photos and get personalized AI-driven recommendations.
GPT-Emotion Analyzer is a web application that detects emotions from faces in photos and generates personalized recommendations based on the detected feelings. Users can upload images or capture photos directly from their webcam. The application uses an AI model for face and emotion detection and then communicates with OpenAI's ChatGPT API (gpt-3.5-turbo) to provide tailored suggestions, such as opinion pieces, music recommendations, or activities suited to the user's emotional state.
- Face & Emotion Detection: Analyzes emotions from uploaded images or live webcam feed.
- AI-Powered Recommendations: Integrates with the ChatGPT API to generate personalized content.
- Emotion Statistics: Displays a breakdown of detected emotions with progress bars.
- Daily Analysis: Provides a personalized daily summary based on the user's emotions.
- Custom Suggestions: Offers music, activities, and other ideas tailored to your mood.
- Frontend:
- Vite
- HTML, CSS, JavaScript
- Backend:
- APIs:
Follow these instructions to set up and run the project locally.
-
Clone the repository:
git clone https://github.com/nolancacheux/gpt-emotion-analyzer.git cd gpt-emotion-analyzer
-
Install client dependencies:
cd client npm install
-
Install server dependencies:
cd ../server npm install
-
Set up your environment variables: Create a
.env
file in theserver
directory and add your OpenAI API key:OPENAI_API_KEY="your_openai_api_key_here"
-
Start the backend server: From the
server
directory, run:npm run server
-
Start the frontend client: In a separate terminal, from the
client
directory, run:npm run dev
-
Open the application: Open your browser and navigate to
http://localhost:5173
. You can now upload an image or use your webcam to start analyzing emotions!
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Don't forget to give the project a star! Thanks again!
Distributed under the ISC License. See LICENSE
for more information.
Nolan Cacheux - @nolancacheux
Project Link: https://github.com/nolancacheux/gpt-emotion-analyzer