Skip to content

Xieyangxinyu/WildfireGPT

Repository files navigation

Personalized and context-specific climate resilience and adaptation with large language model

Arxiv

🚀 The preliminary version of this work has been accepted at the NeurIPS 2024 Workshop on Tackling Climate Change with Machine Learning. We’re thrilled to share the preprint — check it out!

Pre-requisites

We use Python 3.11.6 and Poetry to manage dependencies.

We recommend using pyenv to manage your python versions. To switch to Python 3.11.6, run

pyenv install 3.11.6
pyenv local 3.11.6

To After pulling from github, in your callm folder, do the following to install the dependencies:

poetry build
poetry install # install dependencies
poetry shell # make a virtual environment

If you would like to exit the virtual environment, run

exit # exit shell

Lastly, create a .env file in the root directory of the project and add the following:

OPENAI_API_KEY=<your openai api key>
model=<your model name  # e.g. gpt-4-1106-preview>

Please check OpenAI Model Pricing before choosing a model.

All data are available under the data folder. You can download all the data from this Box Link.

Data

python src/literature/embedding.py
python src/literature/index.py

Run WildfireGPT

We use Streamlit to create a web app. To run the web app, run

streamlit run src/wildfireChat.py

Evaluate the Case Study Results

To evaluate the case study results, run

python src/evaluation/eval_offline.py

This will generate the GPT-as-Judge evaluation results under each case study folder. To compute the domain expert evaluation scores,

python src/evaluation/extract_expert_score.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •