The Emotion Detector API is a Python-Flask application that uses natural language processing to analyze text and identify the dominant emotion from the given input. Part of an educational project for an IBM certification in developing AI applications on Coursera, this app only works through IBM's cloud IDE.
This section provides instructions to get the project running on your local machine for development and testing purposes.
- Python
- Flask
- IBM CLoud IDE
Clone the repository and install the required dependencies within a virtual environment:
git clone https://github.com/carson-evans/Emotion-Detector-API.git
cd Emotion-Detector-API
python -m venv venv
source venv/bin/activate # Use `venv\ScriptsActivate` on Windows
pip install -r requirements.txt
Launch the server with:
python server.py
Send a POST request to http://localhost:5000/emotionDetector
with a JSON body like:
{
"textToAnalyze": "I feel fantastic!"
}
The API will return a JSON response with the detected emotions.
To run the automated tests:
python test_emotion_detection.py
Additionally, you can lint the server file to ensure code quality:
pylint server.py
- Flask - The web framework used.
- Carson Evans - Profile
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
- IBM for the educational opportunity provided.
- Coursera for hosting the IBM certification program.
- All open-source contributors whose tools made this project possible.