This repository contains a Dockerized application for predicting whether it will rain in Australia. The application consists of a frontend and a backend, both running in separate Docker containers.
- Docker installed on your machine
-
Clone this repository:
git clone https://github.com/imounish/cse587-rainfall-prediction.git
-
Navigate to the cloned repository:
cd cse587-rainfall-prediction -
Create a
.streamlit/secrets.tomlfile in the current working directorycse587-rainfall-predictionand add the following secrets:predict_path = "predict" [backend.local] url = "http://backend:8000"
-
Build and run the Docker containers using Docker Compose:
docker-compose up --build
-
Once the containers are up and running, you can access the application in your web browser at
http://localhost:8501.
frontend: Contains the frontend code written in Streamlit.backend/: Contains the backend code written in Python FastAPI.docker-compose.yml: Docker Compose file to orchestrate the containers.
- Visit
http://localhost:8501in your web browser to access the Weather Prediction App. - Enter the required input features in the frontend UI and submit the form.
- The frontend will make a POST request to the backend API endpoint, which will predict whether it will rain based on the input features.
- The backend server exposes an API endpoint at
/predictwhich accepts POST requests containing input features and returns the prediction.
- Make sure to create the
.streamlit/secrets.tomlfile as mentioned in the installation steps to securely store the API endpoint URL.
This project is licensed under the MIT License - see the LICENSE file for details.