This project leverages Natural Language Processing (NLP) and Logistic Regression to classify the sentiment of tweets as either positive
or negative
. The model achieved an accuracy of 82%
. Below you'll find detailed instructions on how to set up and run this project locally, as well as how to use the deployed Streamlit
app.
- Clone the Repository
git clone https://github.com/abhiiiman/Twitter_Sentiment_Analysis.git
cd Twitter_Sentiment_Analysis
- Create a Virtual Environment
python -m venv venv
- Mac Users
source venv/bin/activate
- Windows Users
venv\Scripts\activate
- Install Dependencies
pip install -r requirements.txt
- Download NLTK Data
- In a Python shell, run:
import nltk
nltk.download('stopwords')
nltk.download('punkt')
-
Download the Dataset from here Download the Dataset
-
Run the Streamlit App
streamlit run app.py
- Navigate to the Streamlit App Click Here
- Enter Tweet Content
- Predict Sentiment
- Screenshots
- Negative Tweet
- Positive Tweet