An open API service indexing awesome lists of open source software.

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

NLP tool to extract emotional phrase from tweets 🤩
https://github.com/shahules786/twitter-emotions

docker extraction huggingface nlp pytorch sentiment

Last synced: 11 months ago
JSON representation

NLP tool to extract emotional phrase from tweets 🤩

Awesome Lists containing this project

README

          

[![](https://img.shields.io/github/issues/shahules786/twitter-emotions)]()
[![](https://img.shields.io/github/license/shahules786/twitter-emotions)]()
[![](https://img.shields.io/github/stars/shahules786/twitter-emotions)]()

# 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.

```bash

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

```bash

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

cd twitter-emotions

pip install -r requirements.txt

```

Train Model on your data

```python
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 👋