YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
SentimentAI: BERT Movie Review Sentiment Analysis
A premium, end-to-end sentiment analysis application using a fine-tuned BERT model on the IMDB movie review dataset.
Features
- BERT Backend: fine-tuned
bert-base-uncasedfor high-accuracy sentiment classification. - Fast Training: Configurable script to train on subsets or the full dataset.
- Modern UI: A stunning glassmorphism dashboard for real-time inference.
- REST API: Flask-based API for easy integration.
Project Structure
prepare_data.py: Downloads and tokenizes the IMDB dataset.train_bert.py: Fine-tunes the BERT model.predict.py: Inference class for sentiment prediction.app/: Contains the web dashboard and Flask backend.requirements.txt: Python dependencies.
Setup Instructions
1. Install Dependencies
pip install -r requirements.txt
2. Train the Model
Run the training script to fine-tune BERT on the IMDB dataset.
python train_bert.py
Note: By default, it trains on a small subset (1000 samples) for speed. You can increase subset_size in the script for better accuracy.
3. Run the Web App
- Start the Flask backend:
python app/backend.py
- Open
app/index.htmlin your browser.
Technologies Used
- Python: Core logic and model training.
- Hugging Face Transformers: BERT model implementation.
- PyTorch: Deep learning framework.
- Flask: Web API.
- Vanilla HTML/CSS/JS: Premium frontend with glassmorphism design.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support