Skip to content

arihantdaga/EmotionTagging

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 

Emotion Tagging

This is demonstration of a simple application which can return emotion-tag for any given text. I have many notes in my journal which i wrote on different days. I wanted to tag all of them with my mood. I didn't want to do it all manually. So...

This is based on a pretrained model available on hugging face. mrm8488/t5-base-finetuned-emotion.

How to run

With Docker

docker-compose up

Send a post request with the input text

curl --location --request POST '127.0.0.1:5005/get_emotion' \
--header 'Content-Type: application/json' \
--data-raw '{
    "text": "I think i am very happy to finally have deployed my first model"
}'

// Or NodeJs

var request = require('request');
var options = {
  'method': 'POST',
  'url': '127.0.0.1:5005/get_emotion',
  'headers': {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"text":"I think i am very happy to finally have deployed my first model"})

};
request(options, function (error, response) {
  console.log(response.body); // <pad> joy
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published