Skip to content

SRASHTI2004/fastapi-practice-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 FastAPI ML Project β€” Insurance Prediction

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.


πŸš€ Features

  • 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

πŸ“‚ Project Structure

β”œβ”€β”€ main.py β”œβ”€β”€ fastapi_ml_model.ipynb β”œβ”€β”€ frontend.py β”œβ”€β”€ insurance.csv β”œβ”€β”€ model.pkl β”œβ”€β”€ patients.json β”œβ”€β”€ requirements.txt └── README.md


βš™οΈ Installation & Setup

  1. 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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages