Spaces:
Sleeping
Sleeping
metadata
title: Scenes From Tomorrow
emoji: 🏞️
colorFrom: blue
colorTo: green
sdk:
'[object Object]': null
sdk_version: '{{3.9.10}}'
suggested_hardware:
'[object Object]': null
short_description:
'[object Object]': null
app_file: app.py
pinned: false
This chainlit app will use an OpenAI Assistant and the amazing Probable futures API to provide climate change information for a location, and provide some helpful resources for how to prepare.
The chainlit app is based off the cookbook example here.
Setup
You will need a probable future API key, see here for more details. You will also need an OPENAI key.
Setup a Conda environment ...
- Install miniconda by selecting the installer that fits your OS version. Once it is installed you may have to restart your terminal (closing your terminal and opening again)
- In this directory, open terminal
conda env create -f environment.yml
conda activate climate-env
Once you have these, then ...
- Copy
.env.example
to.env
- Set OpenAI key and Probable Futures API user and secret
- Create assisstent with
python3 create_assistant.py
- Copy the assiostant id from output and put into
.env
If you make changes to the assistant, rerun create_assistant.py
, which will update the existing assistant.
To run chainlit app
chainlit run app.py
To view assistant on OpenAI
Go here