Skip to content

Sentiment-Analysis-for-movie-reviews/Sentiment-Analysis

Repository files navigation

Sentiment-Analysis

Our project aims to analyze people's emotions about the Black lives social movement. We use the BlackLivesMatter Tweet Dataset .

Contact : [email protected], [email protected]

Requirements

install all dependencies

pip3 install -r requirements.txt

Data Processing

The downloaded file training-dataset.csv are in the ./data folder, data_preparation.py process it and give the file Black_dataset.csv, we use the processed dataset directly in our project.

Model Training and Evaluation

We implement our classification model with transformers Hugging Face, we use the basic BertForSequenceClassification model.

After you get the processed dataset, you can train the model with following command in the terminal:

python model_training.py

We evaluate our model with the F1 score, the trained model in each epoch will be saved in ./checkpoints and the best will be saved in ./model/Best_eval.model

UI

We designed the UI to show the function of our model, we implement the backend with FastAPI and the frontend with streamlit.

To start the backend server, please run:

python ./Web_App/backend/main.py

To start the visualizate UI, please open a new terminal and run:

streamlit run ./Web_App/frontend/Hello.py 

you will get the UI web link, please click the link to test our model.

About

This is a school project using Deep learning for sentiment analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages