This is a FastAPI-based web application that uses a Machine Learning model to predict insurance charges based on patient data.
The project demonstrates backend development, model integration, and API handling using FastAPI.
- Developed using FastAPI
- Integrated ML model (model.pkl) for predictions
- Handles JSON input/output efficiently
- Supports frontend integration via
frontend.py - Clean and modular project structure
βββ main.py βββ fastapi_ml_model.ipynb βββ frontend.py βββ insurance.csv βββ model.pkl βββ patients.json βββ requirements.txt βββ README.md
- Clone the repository
git clone https://github.com/SRASHTI2004/fastapi-practice-project.git cd fastapi-practice-project
Create a virtual environment
bash Copy code python -m venv myenv myenv\Scripts\activate # (Windows) Install dependencies
bash Copy code pip install -r requirements.txt Run the app
bash Copy code uvicorn main:app --reload Open in browser: π http://127.0.0.1:8000
π§° Tech Stack Python 3
FastAPI
Uvicorn
Scikit-learn
Pandas
Jupyter Notebook
π Future Improvements Add a proper frontend UI for predictions
Containerize using Docker
Connect to a database for user data storage
π©βπ» Author Srashti Choudhary Backend Developer (Learning Flask & FastAPI)