An interactive AI-powered web application built with Streamlit that predicts the sentiment of text as positive or negative.
This app supports both Machine Learning and Deep Learning models for sentiment analysis.
Sentiment-Analysis.webm
- Predict Sentiment: Detects whether text is positive or negative.
- Dual Model Support: Choose between:
- Machine Learning model (
.pkl) - Deep Learning model (
.keras)
- Machine Learning model (
- Interactive UI: Simple input form for entering text.
- Confidence Score: Displays prediction probability for better insights.
- User-friendly Interface: Built using Streamlit with sidebar options.
- Portfolio Links: About Me section included in sidebar.
- Open the app in your browser.
- Select a model from the sidebar:
- Machine Learning Model (.pkl)
- Deep Learning Model (.keras)
- Enter your text in the input area.
- Click Predict.
- The app will display:
- Sentiment: 😊 Positive /
☹️ Negative - Confidence Score (0–1)
- Sentiment: 😊 Positive /
- Python 3.9+
- Streamlit (Web App)
- NumPy & Pandas (Data Processing)
- TensorFlow / Keras (Deep Learning Model)
- Scikit-learn & Joblib (Machine Learning Model & Serialization)
- The text is preprocessed using a tokenizer.
- Converted to sequences and padded to match model input.
- The selected model predicts the sentiment score.
- Score > 0.5 → Positive sentiment; Score ≤ 0.5 → Negative sentiment.
Mirza Yasir Abdullah Baig
This project is for educational purposes only.
It is not intended for commercial use but demonstrates text-based sentiment analysis with AI.
This project is open-source and available under the MIT License.