Skip to content

Text analysis using artificial intelligence to identify emotion from input

License

Notifications You must be signed in to change notification settings

carson-evans/AI-Sentiment-Analysis-IBM-Watson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emotion Detector API

Introduction

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.

Getting Started

This section provides instructions to get the project running on your local machine for development and testing purposes.

Prerequisites

  • Python
  • Flask
  • IBM CLoud IDE

Installation

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

Usage

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.

Running Tests

To run the automated tests:

python test_emotion_detection.py

Additionally, you can lint the server file to ensure code quality:

pylint server.py

Built With

  • Flask - The web framework used.

Author

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Acknowledgments

  • IBM for the educational opportunity provided.
  • Coursera for hosting the IBM certification program.
  • All open-source contributors whose tools made this project possible.

About

Text analysis using artificial intelligence to identify emotion from input

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published