- Navigate to the directory where the main.py file is located.
- Enter
uvicorn main:app --reloadin the terminal. - Click on the address uvicorn is running on.
There are 3 separate POST endpoints for
-
uploading the csv file
@app.post("/upload/") -
train the model on the data
@app.post("/train/") -
make predictions on unseen data
@app.post("/predict/")
I have also added a rate limiter that limits the number of processing requests, currently set at 2 requests per minute.
@limiter.limit("2/minute")
FastAPI serves a plain HTML page, to upload the Boston.csv file, then select a visualization type. Clicking on submit redirects to another page with the visualization. The visualization is saved to disk in static folder with a date and timestamp.

This page contains a table of some regression coefficients along with the corresponding visualization. This example shows a heatmap.

