Create RestAPI for Car Price Prediction
Build an end to end regression ML model and use Backend RestAPI to serve this model and front end UI so people can interact and use it through web browser.
What is RestAPI
What is the difference between RestAPI and FastAPI
How the RestAPI being developed to serve the model?
How to use Streamlit to design the fount-end UI
What is data parsing?
- Collect dataset
- Create python conda environment
- Explore data
- data preprocessing
- model training
- model evaluation
- model saving
There are 3 moduels:
- Fastapi (Create an API object) that can be run on Unicorn server
- Use pydantic (Basemodel) to specify the schema (Input data)
- Create the route (Home route “/” for health check)
- Create the predict route (Take the input data and convert it to an array so that it can be served by the model)
- Run the Unicorn (And specify the host and port)
How to send request to API?
The request modules allows you to send HTTP requests using Python. The HTTP request returns a response Object with all the response data.
To run the whole things
- Open the API Server
python api/main.py- Run the UI stremlit
streamlit run ui/car_price.py

