Spaces:
Sleeping
Sleeping
Update README.md
Browse files9 unmodified lines101112131414151616171818191920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909 unmodified linespinned: falseshort_description: Streamlit template space---# π¬ IMDb Movie Review Sentiment Analysis
# Welcome to Streamlit!This app predicts whether a movie review is **positive** or **negative** using a Machine Learning model trained on the IMDb dataset.
Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:π **Live App:** (add your Hugging Face link here)
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [communityforums](https://discuss.streamlit.io).---
## π Project Overview
Sentiment analysis is a Natural Language Processing (NLP) task that determines the emotional tone behind a piece of text.
In this project:
- User enters a movie review- The text is transformed using **Bag-of-Words (CountVectorizer)**- A **Logistic Regression** model predicts the sentiment
---
## π§ Model Details
- **Algorithm:** Logistic Regression - **Vectorizer:** CountVectorizer (max_features = 5000, English stopwords removed) - **Train/Test Split:** 80 / 20 - **Evaluation Metric:** Accuracy
β
**Accuracy:** ~0.87
The dataset is balanced between positive and negative reviews, making accuracy a reliable metric.
---
## π Dataset
IMDb Dataset of 50K Movie Reviews Each review is labeled as:
- `positive`- `negative`
---
## βοΈ How It Works
1. User enters a movie review in the app2. The review is converted into numerical features using the trained vectorizer3. The model predicts the sentiment4. The app displays: - Predicted class - Confidence score
---
## π₯οΈ App Features
β Real-time sentiment prediction β Confidence probability β Clean and interactive UI β Handles raw text input
---
## π οΈ Tech Stack
- Python- Scikit-learn- Pandas- Streamlit- Joblib
---
## π Run Locally
```bashpip install -r requirements.txtstreamlit run streamlit_app.pyREADME.md+75-4