How rohitkrish46/vroom-value works
Main Components
• Web Client: Represents the end-user’s browser where HTML pages get rendered. This corresponds to the files in the “templates” directory (carprice.html, home.html, index.html, predict.html, result.html) and styling from “static/styles.css”.
• Flask Web Server (app.py): This is the backbone of the web application and the entry point for all HTTP requests. It handles routing, form submissions, and rendering templates.
• Machine Learning Inference Module: This component encompasses the pre-trained model (model.pkl) and the preprocessor (preprocessor.pkl) stored under the “models” directory. They are used to generate predictions after processing user input.
• Data Analysis & Experimentation (Notebooks): Although not part of the production path, the “notebooks” folder contains notebooks (EDA.ipynb, Feature_engineering.ipynb) that were used for data exploration and feature engineering, which inform the design of the ML model.
• Optional: External libraries and frameworks like Scikit-learn, Pandas, Numpy, Matplotlib, and Seaborn (as seen in the README) that support the ML and visualization aspects.
Relationships & Data Flow
• Flask Server (app.py): The server processes incoming requests. It routes the request to the appropriate endpoint (e.g., home, predict, result). During the prediction process, the server:
– Loads the necessary model and preprocessor if not loaded already.
– Applies preprocessing to the input data.
– Runs the machine learning inference using the selected regression model.
• Response Flow: Once the prediction is generated, it's returned by the Flask application, and the appropriate HTML template is rendered for the user (such as the result page).
• Notebooks in the “notebooks” directory represent offline processes used during the development and benchmarking of various regression models. They have informed the design and tuning of the ML inference component.
Architectural Patterns & Design Principles
• Separation of Concerns: The web frontend (HTML/CSS) is decoupled from the backend logic (Flask in app.py) and the machine learning components (models folder). Each part is clearly defined.
• Modularity: The use of pre-saved models (pickle files) suggests that the inference module is designed to be isolated—allowing independent updates or changes without affecting the Flask application’s routing.
• Simplicity: The directory structure shows an uncomplicated, monolithic web application (as opposed to a microservices architecture) making your component boundaries straightforward.
Relevant Technologies
• Python and Flask for the web server.
• Scikit-learn for machine learning.
• Pandas, Numpy for data handling.
• Matplotlib, Seaborn for any visualization (primarily used during the data science phase).
• HTML/CSS for client-side rendering.