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 🤩
- Host: GitHub
- URL: https://github.com/shahules786/twitter-emotions
- Owner: shahules786
- Created: 2021-03-06T05:29:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-18T06:28:31.000Z (over 4 years ago)
- Last Synced: 2025-03-25T16:54:17.995Z (about 1 year ago)
- Topics: docker, extraction, huggingface, nlp, pytorch, sentiment
- Language: Python
- Homepage:
- Size: 613 KB
- Stars: 40
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
[]()
[]()
[]()
# 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 👋