This application predicts coral bleaching risk using two models:
- Coral Bleaching Predictor – our custom-trained ML model.
- LLaMA 3.1 – a large language model accessed via Ollama.
Make sure Ollama is installed and running.
Start the LLaMA 3.1 model using:
ollama run llama3.1By default, Ollama runs on http://localhost:11434.
Due to their size, the trained model files are not included in this repository.
You must generate them before running the app:
src/models/scaler.pklsrc/models/coral_bleaching_predictor.pkl
To generate these files, run the notebook:
notebooks/noaa_evaluation.ipynbOnce generated, place the files in the following directory:
app/backend/models/
├── coral_bleaching_predictor.pkl
└── scaler.pkl
Navigate to the backend directory and install required packages:
cd app/backend
pip install -r requirements.txtStart the backend server:
cd api
python app.pyThis will launch the backend on http://localhost:8000.
Open your browser and visit:
http://localhost:8000
You can now test coral bleaching predictions using:
- Coral Bleaching Predictor (our custom ML model)
- LLaMA 3.1 (via Ollama)
and use interactive chat powered by LLaMA 3.1, capable of answering questions related to coral reefs, ocean data, and bleaching risk.
-
The backend handles predictions from both models.
-
Make sure Ollama is running before using the Coral Reef AI Assistant.
-
If any issues occur:
- Confirm ports
8000and11434are open. - Ensure LLaMA 3.1 is fully loaded before sending requests.
- Confirm ports
-
Notebook Notes Before Running:
- Please make sure to create a virtual env and attach in the notebook kernel
- Run
pip install -e .from the root of the repo