How padmajaghute339-svg/twitter-sentiment works
This is a Twitter sentiment-analysis application: training data or demo text is cleaned, models are trained and compared, and the selected model is saved for prediction. In the web workflow, a user submits text, Flask cleans and classifies it, and the browser displays the result. Training also produces evaluation metrics for the dashboard. The source excerpts show training and web/API wiring; template and standalone-dashboard internals were not sampled, so their detailed connections are omitted.
Main entry points: train.py Training workflow · app.py Flask API · app.js Dashboard and controls · index.html Web interface
Components 13
Training and evaluation
- Training workflow
twitter_sentiment_project/train.py - Text cleaning
twitter_sentiment_project/preprocess.py - Data exploration
twitter_sentiment_project/train.py - Model comparison
twitter_sentiment_project/train.py
Prediction runtime
- Flask API
twitter_sentiment_project/app.py
Web experience
- Web interface
twitter_sentiment_project/templates/index.html - Dashboard and controls
twitter_sentiment_project/static/js/app.js - Standalone dashboard
twitter_sentiment_project/standalone/dashboard.html
Saved outputs
- Best model
twitter_sentiment_project/models/best_model.joblib - Evaluation results
twitter_sentiment_project/outputs/results.json
Other components
- CLI user
- Tweet CSV
- Browser user
Connections 14
- CLI user → Training workflow: runs training
twitter_sentiment_project/train.py - Tweet CSV → Training workflow: loads tweets
twitter_sentiment_project/train.py - Training workflow → Text cleaning: cleans text
twitter_sentiment_project/train.py - Training workflow → Data exploration: explores data
twitter_sentiment_project/train.py - Training workflow → Model comparison: trains and evaluates
twitter_sentiment_project/train.py - Training workflow → Best model: saves model
twitter_sentiment_project/train.py - Training workflow → Evaluation results: writes metrics
twitter_sentiment_project/train.py - Browser user → Web interface: opens page
- Web interface → Dashboard and controls: loads script
- Dashboard and controls → Flask API: requests predictions
twitter_sentiment_project/static/js/app.js - Flask API → Text cleaning: cleans input
twitter_sentiment_project/app.py - Flask API → Best model: loads and predicts
twitter_sentiment_project/app.py - Dashboard and controls → Flask API: fetches results
twitter_sentiment_project/static/js/app.js - Flask API → Evaluation results: reads metrics
twitter_sentiment_project/app.py