This web application leverages the Twinword API to analyze user input and detect emotions. Built with color emotion psychology in mind, this app offers users an interactive experience where detected emotions are represented with corresponding colors. Users can input prompts, and the application will return an emotional analysis with color associations.
Features Prerequisites Getting Started Environment Variables Running the App Technologies Used
Emotion Detection: Analyzes user input to detect the underlying emotion. Color Interaction: Visual representation of emotions using colors based on color emotion psychology.
To run this project locally, make sure you have the following:
Twinword API Account: Sign up for a free tier account on Twinword API to obtain an API key. Node.js: Ensure you have Node.js installed on your system. Netlify CLI: Install Netlify CLI to help run and deploy locally.
Follow these steps to set up the project locally:
- Clone the Repository
git clone https://github.com/fadingbeat/emotion-analysis.git
cd emotion-analysis
- Install Dependencies
Install all project dependencies specified in package.json:
npm install
- Set Up Environment Variables
You’ll need to create an environment file to store sensitive information like API keys. Create an .env file at the root of the project. Add the following keys to the .env file:
BASE_URL=https://twinword-emotion-analysis-v1.p.rapidapi.com/analyze/
TWINWORD_API_KEY=<Your_Twinword_API_Key>
Replace <Your_Twinword_API_Key> with the API key you obtained from Twinword.
- Install and Configure Netlify
To run the application locally, install the Netlify CLI if you haven’t already:
npm install -g netlify-cli
You can then use Netlify to serve the application locally on localhost:8888.
Once your environment variables are set and dependencies are installed, start the application by running:
netlify dev
or
npm run netlify dev
By default, the application will be available at http://localhost:8888.
Angular 16 Twinword API for emotion detection Netlify for local development and deployment
Let me know if you'd like additional details on any specific part!