How suhassakri/laptop_price_prediction works
This repository is a laptop price prediction and recommendation product with two alternative user-facing implementations. In the Flask workflow, users enter specifications or preferences in the browser; the JavaScript requests options, predictions, or recommendations from Flask, which uses the laptop dataset and (for predictions) a Random Forest model. The Streamlit version provides the same two capabilities in a single app. The README documents the features of both versions; sampled source confirms their implementations and shows no separate model or service layer.
Main entry points: script.js Browser interactions · streamlit_app.py Streamlit interface · laptops.csv Laptop dataset · app.py Flask application
Components 15
Flask version
- Flask page
templates/index.html - Browser interactions
static/script.js - Flask application
app.py - Options endpoint
app.py - Prediction endpoint
app.py - Recommendation endpoint
app.py
Streamlit version
- Streamlit interface
streamlit_app.py - Streamlit prediction
streamlit_app.py - Streamlit recommendations
streamlit_app.py
Data and model
- Laptop dataset
laptops.csv - Flask model training
app.py - Flask Random Forest
app.py - Streamlit model training
streamlit_app.py - Streamlit Random Forest
streamlit_app.py
Other components
- Laptop buyer
Connections 22
- Laptop buyer → Flask page: opens
- Flask page → Browser interactions: loads
- Browser interactions → Options endpoint: requests options
- Options endpoint → Browser interactions: returns options
- Browser interactions → Prediction endpoint: posts specifications
- Prediction endpoint → Browser interactions: returns prediction
- Browser interactions → Recommendation endpoint: posts preferences
- Recommendation endpoint → Browser interactions: returns results
- Flask application → Flask page: renders
- Flask application → Laptop dataset: loads
- Flask application → Flask model training: trains
- Flask model training → Flask Random Forest: fits
- Prediction endpoint → Flask Random Forest: predicts with
- Recommendation endpoint → Laptop dataset: filters and ranks
- Laptop buyer → Streamlit interface: uses
- Streamlit interface → Laptop dataset: loads
- Streamlit interface → Streamlit model training: trains
- Streamlit model training → Streamlit Random Forest: fits
- Streamlit interface → Streamlit prediction: collects inputs
- Streamlit prediction → Streamlit Random Forest: predicts with
- Streamlit interface → Streamlit recommendations: collects preferences
- Streamlit recommendations → Laptop dataset: filters and ranks