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)