Built a Sentiment Analysis Web App – My First Full-Stack ML Project A developer built a full-stack sentiment analysis web app as their first machine learning project, using a Random Forest model with Scikit-Learn and TF-IDF vectorization on the backend and React on the frontend. The app provides real-time positive or negative predictions with confidence scores and prediction history. The project highlighted challenges including model bias toward positive predictions due to small training data and version conflicts between Colab and local environments. Hey dev.to 👋 After spending a month learning Machine Learning through Andrew Ng’s specialization, I wanted to build something real — not just notebooks. So I created a Sentiment Analysis Web App — a full-stack project that takes any text and predicts whether it's Positive or Negative . What I Built - Frontend : React with clean, modern UI - Backend : Flask API - ML Model : Random Forest using Scikit-Learn + TF-IDF - Features : Real-time prediction, confidence score, prediction history Tech Stack - React frontend - Flask + Flask-CORS backend - Scikit-Learn RandomForestClassifier - TF-IDF Vectorizer for text processing What I Learned - From theory to practice — Going from notebooks to a real web app was the biggest leap. - Connecting frontend and backend — Handling API calls, CORS, and state management. - Model limitations — Small training data leads to bias. I learned the hard way why pre-trained models or larger datasets matter. - Full-stack thinking — ML is not just about the model. Deployment, UI/UX, and user experience are equally important. Challenges I Faced - Version conflicts between Colab and local environment - Model bias toward "Positive" predictions Project Structure sentiment-analysis/ ├── backend/ Flask API + ML model │ ├── app.py │ ├── train model.py │ └── sentiment model.pkl │ └── frontend/ React application ├── src/ └── package.json GitHub Repo : You can check out the full project here: machine-learning-projects https://github.com/ElchinNasirov/machine-learning-projects Go to projects/sentiment-analysis/ folder How to Run Locally cd backend python3 train-model.py python3 app.py cd frontend npm start What's Next? I’m continuing to study ML and will be sharing more projects: - Image classification - Recommendation systems - More full-stack ML apps If you're also learning ML, I'd love to hear your journey in the comments