This project is a machine learning application designed to predict trip durations in New York City using a Ridge regression model. The application includes a FastAPI backend for model training and prediction, and a Streamlit frontend for user interaction.
- Docker
- Docker Compose
- Python 3.13
-
Configure
.env.localfile variables. -
Build and run the Docker containers:
make all
- Root:
GET /- Returns a welcome message.
- Ping:
GET /ping- Returns a pong message to check API health.
- Predict:
POST /predict- Accepts a JSON payload with trip details and returns the predicted trip duration.
- Train:
GET /train- Triggers the model training process and saves the trained model.
- Access the Streamlit frontend at
http://localhost:8501. - Use the sliders to input trip details and click "Predict" to get the trip duration prediction.
- Click "Train Model" to trigger the model training process.
This project is licensed under the MIT License.