shahules786 / twitter-emotions

NLP tool to extract emotional phrase from tweets 🤩

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emotional phrase extractor

Extract phrase in the given text that is used to express the sentiment. Capturing sentiment in language is important in these times where decisions and reactions are created and updated in seconds. But, which words actually lead to the sentiment description? This project aims to solve this problem.

Powered using Pytorch + hugggingface 🤗

Try it out.

git clone https://github.com/shahules786/twitter-emotions.git

cd twitter-emotions

sudo docker build --tag twitter-emotions:api .

sudo docker run -p 9999:9999  -it twitter-emotions:api python twitteremotions/app.py

Server will start running on port 9999 of localhost

Example

Installation for development

git clone https://github.com/shahules786/twitter-emotions.git

cd twitter-emotions

pip install -r requirements.txt

Train Model on your data

from twitteremotions.emotions import TwitterEmotions
emotions = TwitterEmotions()
emotions.train(train_path="data/train.csv", epochs=10, batch_size=32, max_len=168, test_size=0.25)

Contributing

All contrbutions are welcome 👋

About

NLP tool to extract emotional phrase from tweets 🤩


Languages

Language:Python 74.0%Language:CSS 13.3%Language:HTML 9.9%Language:Dockerfile 2.8%