This documentation explains how the original Streamlit app was translated into a portfolio-compatible Flask architecture and a fast browser sandbox.
The Streamlit version was converted into a standard Flask pattern with reusable ML functions, file upload routes, API endpoints, and templates. This avoids the Streamlit-specific runtime experience and makes the project easier to deploy as a lightweight web service on Render, Railway, Fly.io, or a private server.
flask_app/ ├── app.py # Flask routes and API endpoints ├── requirements.txt # Flask + ML dependencies ├── models/ # Model/vectorizer metadata copied from source project ├── sample_training_data.csv ├── sample_unlabelled_data.csv ├── templates/index.html └── static/app.js
cd pages/ai-lab/sentiment-automation/flask_app python -m venv .venv .venv\Scripts\activate # Windows pip install -r requirements.txt python app.py
Then open http://127.0.0.1:5000. The portfolio sandbox remains available without starting Flask, while the Flask folder provides the backend-ready version of the converted application.