This repository contains an example of a API that serves a ML model using FastAPI. It was created as part of Project of the Week at DataTalks.Club.
The goal of this project is to predict the prices of Ford cars. It uses the Ford Car Price Prediction dataset.
You can run this project either locally or using Docker.
Before running the API locally, make sure you have Conda installed.
To run this project locally, you need to follow these steps:
-
Create a new conda environment:
conda create --name fastapi-car-price-pred
-
Activate the conda environment:
conda activate fastapi-car-price-pred
-
Install the project dependencies:
pip install -r requirements.txt
-
Run the API:
python main.py
Before running the API with Docker, make sure that you install it following these steps.
To run the API using Docker:
-
Build the Docker image:
docker build -t fastapi-car-price-pred .
-
Run the API:
docker run -p 8000:8000 fastapi-car-price-pred