Skip to content

Repository files navigation

🎬 Sentiment Analysis Web App

A Streamlit-based web application that analyzes movie review sentiments using two different models:

  • Logistic Regression (TF-IDF)
  • LSTM (Deep Learning)

🧠 Overview

This project demonstrates how to build and deploy a sentiment analysis web app with two NLP models.
Users can enter any movie review text and instantly get a positive or negative prediction.


⚙️ Project Structure

sentiment-analysis-app/ │ ├── app.py # Streamlit web app ├── train_models.ipynb # Jupyter notebook for training models ├── requirements.txt # Dependencies ├── model_logistic.pkl # Logistic Regression model ├── tfidf_vectorizer.pkl # TF-IDF vectorizer ├── model_lstm.h5 # LSTM neural network model ├── tokenizer.pkl # Tokenizer for LSTM └── README.md # Documentation

🧾 Requirements

  • streamlit
  • pandas
  • numpy
  • tensorflow
  • nltk
  • scikit-learn
  • keras
  • transformers
  • torch

Install all dependencies: pip install -r requirements.txt

🚀 Run the App

Activate your virtual environment (optional) and run:

streamlit run app.py

Train Your Own Models

To retrain or modify the models, open the notebook:

sentiment_analysis.ipynb This notebook includes all steps for:

Text preprocessing

Logistic Regression (TF-IDF)

LSTM model training

Saving model files for deployment

Link of Streamlit cloud deployment

https://abdoelmon-sentiment-analysis.streamlit.app/

About

Streamlit-based web application that analyzes movie review sentiments

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages