A production-style Sentiment Analysis Dashboard built using pretrained Transformer models and Streamlit. The project demonstrates how to go from raw text data → cleaned dataset → model inference → interactive visual analytics.
This repository is suitable for:
- Machine Learning / NLP internships
- Data Science portfolios
- Demonstrating real-world use of pretrained models
- Streamlit App: https://sentimental-dashboard.streamlit.app/
- GitHub Repository: https://github.com/maroofiums/Sentiment-Dashboard
- Kaggle Notebook: https://www.kaggle.com/code/maroofiums/sentiment-analysis/
This dashboard allows users to:
- Analyze sentiment of a single text input in real time
- Upload a CSV file and run batch sentiment analysis
- Use demo data for instant visualization
- Explore results through multiple interactive graphs
The model is not trained from scratch. Instead, it uses pretrained Transformer models from Hugging Face, which reflects how NLP systems are commonly built in industry.
- Python
- Streamlit
- Hugging Face Transformers
- PyTorch (backend for transformers)
- Pandas
- Matplotlib
Sentiment-Dashboard/
├── Data
│ ├── Clean
│ │ └── comments.csv
│ └── Raw
│ └── imdb_dataset.csv
├── Frontend
│ ├── main.py
│ └── requirements.txt
├── Notebook
│ ├── Clean_Demo_Data_For_Sentimental_Dashboard_Project.ipynb
│ └── sentiment_analysis.ipynb
└── requirements.txt
-
Enter any text
-
Instantly see:
- Predicted sentiment (Positive / Negative)
- Confidence score
- One-click loading of demo reviews
- Useful for quick testing and visualization
- Upload your own dataset
- Select the column that contains text
- Limit number of rows for faster analysis
- Efficient batch inference using pretrained models
- Cached model loading for performance
- Sentiment Count (Bar Chart)
- Sentiment Distribution (Pie Chart)
- Confidence Score Histogram
- Score by Sentiment (Box Plot)
- Sentiment Trend (Line Chart)
Layout is optimized as:
- First row: 3 plots
- Second row: 2 centered plots
- Raw data sourced from IMDB-style reviews
- Cleaned using Pandas in Jupyter notebooks
- Dataset is intentionally noisy and slightly imbalanced to simulate real-world user reviews
This helps make trends, histograms, and distributions more realistic.
conda create -n sentiment-dashboard python=3.10 -y
conda activate sentiment-dashboardpip install -r requirements.txtcd Frontend
streamlit run main.py- Default Hugging Face
sentiment-analysispipeline - Transformer-based pretrained model
- No custom training required
This reflects real-world usage where pretrained models are fine-tuned or directly deployed.
- Binary sentiment only (Positive / Negative)
- Very long texts are truncated for performance
- Confidence score reflects model probability, not human certainty
- Neutral sentiment support
- Time-based sentiment aggregation
- Export analyzed results as CSV
- Replace Matplotlib with Plotly for richer interactivity
- Authentication and user-specific dashboards
This project is designed to demonstrate practical NLP skills, clean code structure, and real-world ML workflows rather than just model accuracy.