Skip to content

Sentiment analysis neural network trained by fine-tuning BERT, ALBERT, or DistilBERT on the Stanford Sentiment Treebank.

License

Notifications You must be signed in to change notification settings

kevtv/SentimentAnalysis

 
 

Repository files navigation

Sentiment Analysis

Sentiment analysis neural network trained by fine-tuning BERT, ALBERT, or DistilBERT on the Stanford Sentiment Treebank.

https://i.imgur.com/XPQFCix.mp4

Install requirements

pip install numpy pandas torch transformers

Analyze your inputs with the model that I've uploaded on s3

python analyze.py

Train model

python train.py --model_name_or_path bert-base-uncased --output_dir my_model --num_eps 2

bert-base-uncased, albert-base-v2, distilbert-base-uncased, and other similar models are supported.

Evaluate the model that you have trained

python evaluate.py --model_name_or_path my_model

Analyze your inputs with the model you have trained

python analyze.py --model_name_or_path my_model

Setup server

pip install flask flask_cors

Run server

python server.py --model_name_or_path my_model

Setup client

cd client
npm install

Run client

cd client
npm run serve

About

Sentiment analysis neural network trained by fine-tuning BERT, ALBERT, or DistilBERT on the Stanford Sentiment Treebank.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.6%
  • Vue 13.2%
  • HTML 2.1%
  • JavaScript 1.1%