Detailed guide for installation, usage, troubleshooting, and FAQs.
Simply visit: https://arungurajapu.github.io/Sentiment_Analysis
No installation, registration, or dependencies needed!
git clone https://github.com/arungurajapu/Sentiment_Analysis.git
cd Sentiment_AnalysisThis is a pure frontend project. No pip install, no npm install needed.
Method A: Open directly in browser
# Windows
start index.html
# Mac
open index.html
# Linux
xdg-open index.htmlMethod B: Use a local server
python -m http.server 8000
# Visit http://localhost:8000 in your browserStep 1: Open the app
- Visit https://arungurajapu.github.io/Sentiment_Analysis
- Or open
index.htmllocally
Step 2: Select "Text" mode
- Click the "Text" button at the top (default mode)
Step 3: Enter your text
- Paste or type your text in the textarea
- One sentence per line for best results
- Example:
I love this product! Terrible service and support. Amazing experience overall.
Step 4: Analyze
- Click "Analyze Sentiment" button
- Or press Ctrl + Enter
Step 5: View results
- See sentiment predictions (✅ POSITIVE or ❌ NEGATIVE)
- Each result shows confidence score (0-100%)
- Your analysis auto-saves to history
Example Output:
✅ POSITIVE (98.5%)
"I love this product!"
❌ NEGATIVE (96.2%)
"Terrible service and support."
✅ POSITIVE (94.1%)
"Amazing experience overall."
Step 1: Open the app
Step 2: Select "Dataset" mode
- Click the "Dataset" button
Step 3: Upload your file
- Click "Choose File"
- Select CSV or Excel file (.csv, .xlsx, .xls)
- Supported file size: up to 50MB
Step 4: Specify text column
- Enter the column name containing text
- Must match exactly (case-sensitive)
- Examples: "Review", "Text", "Comment", "feedback"
- Example file structure:
→ Enter column name: "Review"
| id | Review | Rating | | 1 | Love it! | 5 | | 2 | Hate it | 1 |
Step 5: Analyze
- Click "Analyze Sentiment"
Step 6: View results
- See all rows analyzed with sentiments
- First 10 results displayed (most important ones)
- Results stored in analysis history
Example:
File: product_reviews.csv
Column: "Review"
Status: ✅ 150 rows analyzed
Results:
✅ POSITIVE (99.2%) | "Love it!"
❌ NEGATIVE (98.5%) | "Hate it"
... (more results)
| Feature | How It Works |
|---|---|
| Text Mode | Analyze 1-100+ sentences instantly. One sentence per line. |
| Dataset Mode | Upload CSV/Excel. Select text column. Auto-analyzes all rows. |
| Real-time Prediction | Get results in <1 second per text. |
| Confidence Score | 0-100% score. Higher = more confident prediction. |
| Positive/Negative | Binary classification (no "neutral" category). |
| Analysis History | All past analyses saved locally in your browser. |
| Responsive Design | Works perfectly on phone, tablet, desktop. |
Q: Is my data saved on your server? A: No. Analysis history stays in your browser only. We don't send user data to any server except the sentiment prediction API.
Q: Can I use this for commercial purposes? A: Yes! Under Apache 2.0 License. You can modify, distribute, and use commercially.
Q: Can I analyze non-English text? A: Currently English only. Model trained on English data. Multilingual version coming soon.
Q: Why are results sometimes wrong? A: DistilBERT is 91% accurate. Complex sarcasm, context, and slang sometimes confuse it. This is normal for NLP models.
Q: When will login/register be available? A: User authentication features coming in future updates!
Q: Can I download results as CSV? A: Future feature! For now, take screenshots or copy results manually.
Q: How accurate is the model? A: ~91% accuracy on standard test datasets. Performs best on clear, straightforward sentiment text.
Q: What's the difference between Positive and Negative? A: The model classifies text into two categories. Neutral sentiment is classified as either slightly positive or negative.
Q: How does it work internally? A:
- You submit text to the app
- Text is sent to Hugging Face API
- DistilBERT processes it
- Returns sentiment prediction (Positive/Negative) + confidence score
- Results displayed instantly
Q: What model is used? A: DistilBERT (distilbert-base-uncased-finetuned-sst-2-english)
- Trained on Stanford Sentiment Treebank (SST-2)
- ~91% accuracy
- Sub-second predictions
- Lightweight and fast
Q: Is there an API I can use? A: Yes! The backend uses Hugging Face Spaces API. See main README for endpoints.
Q: Can I modify the model? A: The frontend is yours to modify. For backend model changes, visit Hugging Face Spaces.
Q: How many texts can I analyze at once? A: Text Mode: 100+ sentences. Dataset Mode: Limited by file size (50MB max), typically 1000s of rows.
Q: What file formats are supported? A: CSV (.csv) and Excel (.xlsx, .xls) files.
Q: How do I specify the column name for dataset analysis? A: Enter exactly as it appears in your file (case-sensitive).
- ❌ "review" won't match "Review"
- ✅ "Review" matches "Review"
Q: Can I analyze multiple columns? A: Not currently. Specify one text column per analysis.
Q: How long does analysis take? A: Usually <1 second per text. Depends on:
- File size
- Internet connection
- API server status
Q: Where are my results stored? A: In your browser's localStorage (local storage on your computer). Not on any server.
Q: Can I clear my history? A: Yes. Future feature coming. For now, clear browser data manually.
Q: Does it work on mobile? A: Yes! Fully responsive. Works on iPhone, Android, tablets, desktops.
Q: Can I upload files on mobile? A: Yes, but file upload depends on your browser. Some mobile browsers have limitations.
Q: Is it slow on mobile? A: No, same speed as desktop. Results still <1 second.
Symptom: App not appearing, blank page
Solutions:
- Clear browser cache (Ctrl+Shift+Delete on Windows, Cmd+Shift+Delete on Mac)
- Disable browser extensions (especially ad blockers)
- Try in incognito/private mode
- Check internet connection
- Try different browser (Chrome, Firefox, Safari)
Symptom: Error message when clicking "Analyze"
Possible causes & solutions:
- No internet connection → Check WiFi/data connection
- API server down → Hugging Face Spaces might be restarting. Wait 1-2 minutes and try again.
- CORS error → Usually temporary. Refresh page and retry.
- Timeout error → API took too long. Check your internet speed or try with smaller file.
Check error details:
- Open browser console (F12)
- Click "Console" tab
- Look for detailed error message
- Share error details if contacting support
Symptom: Analysis history empty after refresh
Causes:
- Private/Incognito mode enabled (disables localStorage)
- Browser storage full
- Browser storage disabled
Solutions:
- Use normal mode (not private/incognito)
- Clear browser storage (Settings → Privacy → Clear browsing data)
- Check if localStorage is enabled:
- Open console (F12)
- Type:
localStorage.setItem('test', 'value') - If error appears, localStorage is disabled
Symptom: Can't upload file or file won't process
Check these:
- File format is CSV or Excel (.csv, .xlsx, .xls) ✓
- Column name matches exactly (case-sensitive) ✓
- File size < 50MB ✓
- No special characters in column name ✓
- File is valid (not corrupted) ✓
Example:
❌ "product reviews" (space in file)
❌ "Reviews" (doesn't match "review" in file)
✅ "review" (matches column name exactly)
Symptom: Predictions don't match your expectations
Remember:
- Model is 91% accurate (not 100%)
- Sarcasm, slang, context often confuse it
- Model trained on English data
- Idioms might be misclassified
- Example:
- "This is terrible" → NEGATIVE ✓
- "This is terribly good" → Might classify wrong (context issue)
Solutions:
- Verify manually - sometimes model is right, you're wrong!
- Rephrase text more clearly
- Try shorter sentences
- Report persistent issues on GitHub
Issue: Page loads slow
Solutions:
- Check internet speed
- Hugging Face API might be busy. Try again in few minutes.
- Disable extensions
Issue: Text not analyzing
Solutions:
- Ensure text is not empty
- Try shorter text first
- Check internet connection
- Clear console errors
Issue: File upload button not working
Solutions:
- Refresh page
- Try different browser
- Check browser permissions (Settings → Privacy)
| Browser | Status | Notes |
|---|---|---|
| Chrome | ✅ Perfect | Recommended |
| Firefox | ✅ Perfect | Works great |
| Safari | ✅ Perfect | Works on Mac/iOS |
| Edge | ✅ Perfect | Works great |
| Opera | ✅ Perfect | Works great |
| Internet Explorer | ❌ Not supported | Too old, use modern browser |
For faster analysis:
- Keep sentences short (2-10 words optimal)
- Use clear, standard English
- Avoid special characters
- Use smaller files (< 10MB for datasets)
- Ensure good internet connection
- Close other browser tabs
✓ English text only ✓ Works best with 2-10 word sentences ✓ Handles sarcasm inconsistently ✓ Max 10 results displayed at once (but processes all) ✓ File size limit: 50MB ✓ No neutral sentiment category (Positive or Negative only) ✓ Context sometimes lost in short phrases
If you find a bug:
- Open browser console (F12)
- Screenshot the error
- Go to GitHub Issues
- Create new issue with details
For questions: 📧 Email: arungurajapu@gmail.com
Last Updated: December 31, 2025 Status: ✅ Complete & Tested