A production-ready Sentiment Analysis system using a fine-tuned BERT model.
This project is a Sentiment Analysis Application built using a fine-tuned BERT model on the IMDB movie reviews dataset.
- The model is trained via the Hugging Face Trainer API (3 epochs)
- Performs binary sentiment classification (Positive / Negative)
- Includes an intuitive Gradio UI and Docker deployment
-
Single Review Analysis - analyse sentiment of single review
-
Batch Review Analysis - analyse sentiment of multiple reviews uploaded in CSV file with review column .
-
Youtube Comment Analysis - fetch the comments of youtube video and analyse it's sentiment.
📌 Click to expand UI Screenshots
📦 BERT-Sentiment-Analyzer
│
├── sentiment_analyser.py # Model class (modular + reusable)
├── LLM_review.py # LLM-based review analysis module
├── youtube_data.py # Fetch + preprocess YouTube comments/videos
├── app_interface.py # Gradio UI
├── requirements.txt
├── Dockerfile
├── .dockerignore
├── .gitignore
├── README.md
├── assets/ # screenshots or icons
└── BERT_Fine_Tuning.ipynb # fine-tuned BERT model
1️⃣ Clone the repository
git clone https://github.com/BhagwatiOracle/BERT-Sentiment-Analyser.git
cd BERT-Sentiment-Analyser2️⃣ Create a virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate3️⃣ Install dependencies
pip install -r requirements.txt4️⃣ Create .env file and set up api keys
GROQ_API_KEY = "your_groq_api_key"
YOUTUBE_DATA_API_KEY = "your_youtube_data_api_key"5️⃣ Run the app
python app_interface.py1️⃣ Build image
docker build -t sentiment-app .
2️⃣ Run container
docker run -p 8000:8000 sentiment-app
3️⃣ Open Browser
http://localhost:8000
Pull requests are welcome! Feel free to open issues for improvements.



