How roshniranads27/a_flask-api_driven_machine_learning_model-personalized_medical_recommendation_system works
Project Type and Purpose
• This is a full-stack machine learning application primarily built as a Flask API. Its purpose is to take user symptom inputs via a one-screen dashboard, process them using machine learning models (such as Linear Regression, SVC, RandomForest, etc.), and return personalized medical recommendations including disease predictions, descriptions, medication lists, workout routines, diets, and precautionary advice.
• The README clearly states that the system integrates data science workflows (data cleaning, model training using libraries like scikit-learn, pandas, and others) with a web-based interface, making it an end-to-end solution for personalized diagnostics.
Analyzing the File Structure
• Top-Level Files: Notebooks like “HealthCareML_Code_Roshni.ipynb”, “Intial_Analysis_Project_4.ipynb”, and “data_description.ipynb” show the exploratory data analysis, cleaning, and model training phases.
• Directories:
– “archive”: Contains older and versioned analyses (notebooks, CSV files, pickled models) indicating historical experiments.
– “dataset”: Houses datasets including CSV files for symptoms, diagnostics, and chest X-ray images, reinforcing the data-intensive nature.
– “model”: Stores pre-trained models (rf.pkl, svc.pkl) as artifacts used by the Flask backend.
– “static”: Contains CSS files and the “uploads” folder for client-side assets.
– “templates”: Contains HTML files (like index, about, blog, contact, developer) that form the web dashboard.
– “main.Roshni.py”: Likely the main Flask application entrance point.
Architectural Patterns and Key Components
• Frontend/UI:
– Built using HTML templates in the “templates” folder.
– Static assets (CSS, images) are served from the “static” directory.
– Represents the user dashboard where symptom inputs are provided and recommendations are displayed.
• Backend/API:
– Implemented using Flask (as mentioned in the README).
– “main.Roshni.py” acts as the central controller: it receives user input, handles API routing, and interfaces with the ML models.
• Machine Learning Component:
– ML models are stored in the “model” folder (e.g., rf.pkl, svc.pkl) and are loaded during runtime.
– The code leverages various libraries (scikit-learn, pandas, numpy) to process user inputs, perform predictions, and then generate complete recommendations (including auto-spelling correction and synonym mapping).
• Data Management/Processing:
– Notebooks and CSV files found under “archive” and “dataset” suggest that data cleaning and analysis pipelines exist. Although these are used in the development/training phase, they are part of the overall lifecycle.
– Images and additional datasets (for chest X-rays) could also indicate support for image data pipelines if used for further diagnostic purposes.