Analyze emotions in text instantly using AI-powered DistilBERT. Perfect for understanding customer feedback, social media sentiment, product reviews, and research data. Upload datasets or paste text to get real-time positive/negative sentiment predictions with confidence scores.
- Visit the live demo (no installation needed!)
- Paste text or upload CSV/Excel file
- Click "Analyze Sentiment"
- View results with confidence scores
📖 For detailed setup & usage: See GUIDE.md
🚀 Real-time sentiment prediction (Positive/Negative) 📊 Batch analysis with CSV/Excel datasets 🤖 DistilBERT transformer model for high accuracy ⚡ Instant results with confidence scores 📱 Fully responsive mobile design 🌐 Hosted on GitHub Pages + Hugging Face
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- Backend API: Hugging Face Spaces (DistilBERT)
- Hosting: GitHub Pages
- Model: DistilBERT (Transformer-based NLP)
- Storage: Browser localStorage
- Database: JSON-based user management
Frontend (GitHub Pages)
↓
HTML/CSS/JavaScript
↓
Calls API Endpoints
↓
Hugging Face DistilBERT
↓
Returns Sentiment Predictions
↓
Display Results + Save to History
index.html - Main UI with text/dataset input, results display script.js - API calls, history management, result rendering style.css - Responsive design, result cards, modal styling
Sentiment_Analysis/
│
├── index.html # Main application page
├── script.js # JavaScript logic & API calls
├── style.css # Styling & responsive design
├── README.md # This file
├── GUIDE.md # Complete guide (installation, usage, FAQ)
└── assets/ # Screenshots (add later)
Model: DistilBERT (distilbert-base-uncased-finetuned-sst-2-english)
Accuracy: ~91% on test data Speed: Sub-second predictions Languages: English Training Data: SST-2 (Stanford Sentiment Treebank)
You can view and run the full training and experimentation in this Colab notebook:
The app uses Hugging Face Spaces API with DistilBERT for sentiment analysis.
POST https://arungurajapu-sentiment_analysistthis.hf.space/predict_text
POST https://arungurajapu-sentiment_analysistthis.hf.space/predict_file
For detailed API documentation, visit the Hugging Face Spaces endpoint.
✓ English text only (model trained on English) ✓ Works best with 2-10 word sentences ✓ Handles sarcasm inconsistently (common in NLP) ✓ Max 10 results displayed (load first 10) ✓ File size limit: ~50MB (reasonable for most datasets)
✅ Chrome/Brave (Recommended)
✅ Firefox
✅ Safari
✅ Edge
Deployed on: GitHub Pages (auto-updates with git push) Live URL: https://arungurajapu.github.io/Sentiment_Analysis Hosted by: GitHub (free, unlimited) Backend API: Hugging Face Spaces (free tier)
- Fork this repository
- Enable GitHub Pages in settings
- Push changes to
mainbranch - Your version goes live at
https://yourusername.github.io/Sentiment_Analysis
Contributions welcome! Here's how:
- Fork the repository
- Create a feature branch:
git checkout -b feature/awesome-feature - Make changes and commit:
git commit -m 'Add awesome feature' - Push to branch:
git push origin feature/awesome-feature - Submit a Pull Request
This project is licensed under the Apache License 2.0.
You are free to: ✅ Use commercially ✅ Modify ✅ Distribute ✅ Include in your projects
Full license: See LICENSE file or Apache 2.0 License
👤 Chandra Mouli Arun Gurajapu 📧 Email: arungurajapu@gmail.com 🔗 GitHub: @arungurajapu
🙏 DistilBERT - Hugging Face for transformer model 🙏 GitHub - Free hosting with GitHub Pages 🙏 Hugging Face - Spaces for easy API deployment 🙏 Inspired by industry-standard sentiment analysis tools
If this project helped you, please ⭐ star it on GitHub!
Last Updated: December 31, 2025 Status: ✅ Production Ready