How diegoa-rodriguezc/ua-analisis-machine-learning works
Project type and purpose
• From the file tree and README, this is a single-page Streamlit ML dashboard (“UA-analisis-machine-learning”).
• It loads a pre-trained model (lgboost_binary.joblib), reads auxiliary JSON values (unique_values_for_streamlit.json), and presents results through Streamlit’s web UI.
File structure
• Top-level:
• .devcontainer/ (VS Code dev container definition)
• .streamlit/ (Streamlit config)
• main.py (the Streamlit app entrypoint)
• lgboost_binary.joblib (ML model)
• unique_values_for_streamlit.json (static data for UI drop-downs)
• requirements.txt (dependencies)
• No separate “frontend” vs “backend” directories: it’s a monolithic Python service combining UI and server logic.
Main components
a. User / Browser
b. Streamlit Application Server (Python runtime + dependencies)
c. Configuration & Static Assets
• .streamlit/config.toml
• unique_values_for_streamlit.json
d. Pre-trained Model Artifact (lgboost_binary.joblib)
e. Optional Dev Environment Container (.devcontainer)
Relationships and interactions
1. The User’s browser sends HTTP/WebSocket requests to the Streamlit server.
2. main.py (controller) loads configuration (.streamlit), static values (JSON), and the ML model.
3. Upon user input, the controller:
• Applies any preprocessing to inputs
• Runs inference via the joblib-loaded model
• Returns predictions and visualizations to the UI
4. The UI updates dynamically in the browser.
Architectural patterns & design principles
• Monolithic MVC-style:
• Model: lgboost_binary.joblib
• View: Streamlit front end (main.py’s layout + built-in widgets)
• Controller: main.py’s callback functions
• “Configuration as code”: uses .streamlit/config.toml and requirements.txt
• Reproducible dev environment via .devcontainer
Putting it all together
• Inside it, position: