Skip to content

Latest commit

Β 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Bangla Movie Reviewer

A full-stack web application for sentiment analysis of Bangla movie reviews using 6 different machine learning models.

Python Django React Hugging Face License


✨ Features

  • πŸ€– 6 ML Models - Choose from Transformer, Deep Learning, and Classical ML models
  • πŸ‡§πŸ‡© Bangla Support - Optimized for Bangla language sentiment analysis
  • 🎨 Beautiful UI - Modern gradient theme with custom dropdown
  • πŸ“Š Word Highlighting - See which words influenced the prediction
  • πŸ“ˆ Confidence Scores - Get prediction confidence percentages
  • πŸ“œ Analysis History - Track your previous analyses
  • ⚑ Fast & Responsive - Smooth animations and instant feedback

πŸš€ Quick Start

One Command Setup:

git clone <your-repo-url>
cd BanglaMovieReviewer
.\start.bat

That's it! Browser opens at http://localhost:3000


πŸ€– Available Models

Model Type Icon Description
BanglaBERT Transformer πŸ‡§πŸ‡© Fine-tuned BERT for Bangla
mBERT Transformer 🌍 Multilingual BERT
CNN Deep Learning 🧠 Convolutional Neural Network
Masked_LSTM Deep Learning πŸ”„ Recurrent Neural Network
LightGBM Classical ML ⚑ Gradient Boosting
Logistic Regression Classical ML πŸ“Š Linear Classifier

All models hosted on Hugging Face: shksabbir7


πŸ“Έ Screenshots

Home Page

Home

Analyzer with Model Dropdown

Analyzer

History Page

History

Positive Result

Positive

Negative Result

Negative


πŸ› οΈ Tech Stack

Backend:

  • Framework: Django 4.2.7
  • API: Django REST Framework
  • ML Libraries: Transformers, TensorFlow, PyTorch, LightGBM, Scikit-learn
  • Model Hub: Hugging Face Hub
  • Database: SQLite

Frontend:

  • Framework: React 18.2
  • HTTP Client: Axios
  • Icons: Lucide React
  • Routing: React Router
  • Styling: Custom CSS with gradients

πŸ“‹ Prerequisites

  • Python: 3.8 or higher
  • Node.js: 14 or higher
  • RAM: 4GB minimum (8GB recommended)
  • Internet: Required for first run (model download)

πŸ”§ Installation

Option 1: Automated Setup (Recommended)

# Clone repository
git clone <your-repo-url>
cd BanglaMovieReviewer

# Run setup script (first time: 10-15 minutes)
.\run_all.bat

Option 2: Manual Setup

Backend:

cd backend
python -m venv venv
call venv\Scripts\activate.bat
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

Frontend:

cd frontend
npm install
npm start

🎯 Usage

  1. Start Application:

    .\start.bat
  2. Open Browser: http://localhost:3000

  3. Select Model: Choose from dropdown (6 models)

  4. Enter Review: Type Bangla movie review (max 5000 chars)

  5. Analyze: Click "বিঢ্লেষণ করুন"

  6. View Results:

    • Sentiment (Positive/Negative/Neutral)
    • Confidence percentage
    • Word importance scores
    • Color-coded word highlighting

πŸ§ͺ Testing

Automated Tests:

cd backend
call venv\Scripts\activate.bat
python auto_test.py

Tests Include:

  • βœ… Backend connection
  • βœ… Model availability (6 models)
  • βœ… Valid analysis
  • βœ… Input validation
  • βœ… Edge cases
  • βœ… All models working

Expected: 7/7 tests pass


πŸ“ Project Structure

BanglaMovieReviewer/
β”œβ”€β”€ backend/              # Django backend
β”‚   β”œβ”€β”€ sentiment_api/   # Main API app
β”‚   β”œβ”€β”€ config/          # Django settings
β”‚   └── requirements.txt # Python dependencies
β”œβ”€β”€ frontend/            # React frontend
β”‚   β”œβ”€β”€ src/            # Source code
β”‚   └── package.json    # Node dependencies
β”œβ”€β”€ docs/               # Documentation
β”œβ”€β”€ screenshots/        # UI screenshots
β”œβ”€β”€ start.bat          # Quick start script
└── run_all.bat        # Full setup script

Detailed Structure: See PROJECT_DOCUMENTATION.md


🌐 API Endpoints

Base URL: http://localhost:8000/api/sentiment

Method Endpoint Description
GET /models/ List available models
POST /analyze/ Analyze sentiment
GET /history/ Get analysis history

Full API Docs: See docs/API_DOCUMENTATION.md


🎨 Features in Detail

Custom Model Dropdown:

  • 🎯 6 models with unique icons
  • πŸ’« Smooth animations
  • 🎨 Gradient background
  • ✨ Hover effects
  • πŸ” Active state highlighting

Input Validation:

  • βœ… Empty text detection
  • βœ… Character limit (5000)
  • βœ… Real-time counter
  • βœ… Error messages in Bangla

Results Display:

  • πŸ“Š Sentiment classification
  • πŸ’― Confidence percentage
  • 🎨 Word highlighting
  • πŸ“ˆ Importance scores
  • πŸ”„ Easy model switching

πŸš€ Deployment

Hugging Face Models:

All models automatically download from Hugging Face on first use. No large files in repository!

Environment Variables:

DJANGO_SECRET_KEY=your-secret-key
DEBUG=False
ALLOWED_HOSTS=your-domain.com

Deploy to:

  • Heroku
  • Railway
  • Render
  • AWS
  • Google Cloud

Deployment Guide: See docs/DEPLOYMENT.md


πŸ“š Documentation


🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

πŸ› Troubleshooting

Backend won't start:

cd backend
call venv\Scripts\activate.bat
pip install -r requirements.txt
python manage.py migrate

Frontend won't start:

cd frontend
npm install
npm start

Models not downloading:

  • Check internet connection
  • Verify Hugging Face is accessible
  • Wait patiently (first download takes 2-3 min per model)

More Solutions: See docs/TROUBLESHOOTING.md


πŸ“Š Model Performance

Model Accuracy Speed Size
BanglaBERT ⭐⭐⭐⭐⭐ ⭐⭐⭐ Large
mBERT ⭐⭐⭐⭐ ⭐⭐⭐ Large
CNN ⭐⭐⭐⭐ ⭐⭐⭐⭐ Medium
Masked_LSTM ⭐⭐⭐⭐ ⭐⭐⭐ Medium
LightGBM ⭐⭐⭐ ⭐⭐⭐⭐⭐ Small
Logistic Regression ⭐⭐⭐ ⭐⭐⭐⭐⭐ Small

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨πŸ’» Author

Hugging Face Models: shksabbir7

Models:


πŸ™ Acknowledgments

  • Hugging Face for model hosting
  • Django & React communities
  • Bangla NLP community
  • All contributors

πŸ“ž Support


πŸŽ‰ Quick Commands

# First time setup
.\run_all.bat

# Daily usage
.\start.bat

# Run tests
cd backend && python auto_test.py

# Stop servers
# Close both terminal windows

Made with ❀️ for Bangla NLP

Star ⭐ this repo if you find it useful!

About

🎬 AI-powered Bangla movie review sentiment analyzer with explainable AI. Built with Django, React, mBERT & LIME. Real-time analysis with visual explanations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages