Spaces:
Sleeping
Sleeping
Merge pull request #10 from boettiger-lab/feat/update_app
Browse files- app/app.py +4 -4
- app/footer.md +30 -0
- app/variables.py +6 -50
- requirements.txt +10 -11
app/app.py
CHANGED
|
@@ -302,7 +302,7 @@ with col2:
|
|
| 302 |
|
| 303 |
st.divider()
|
| 304 |
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
|
|
|
| 302 |
|
| 303 |
st.divider()
|
| 304 |
|
| 305 |
+
with open('app/footer.md', 'r') as file:
|
| 306 |
+
footer = file.read()
|
| 307 |
+
st.markdown(footer)
|
| 308 |
+
|
app/footer.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Credits
|
| 2 |
+
Authors: **Cassie Buhler** ([CIRES](https://cires.colorado.edu/), [ESIIL](https://esiil.org/), CU Boulder) and **Carl Boettiger** (UC Berkeley \& [ESIIL](https://esiil.org/))
|
| 3 |
+
|
| 4 |
+
PRIVATE DRAFT. All data copyright to Trust for Public Land. See <https://conservationalmanac.org/> for details.
|
| 5 |
+
|
| 6 |
+
Data: https://data.carlboettiger.info/public-tpl
|
| 7 |
+
|
| 8 |
+
#### Data sources
|
| 9 |
+
1. **Trust for Public Land (2025)**. *LandVote*. Data: www.landvote.org. License: Public Domain
|
| 10 |
+
|
| 11 |
+
2. **Trust for Public Land (2025)**. *Conservation Almanac*. Data: https://conservationalmanac.org/. License: Public Domain
|
| 12 |
+
|
| 13 |
+
3. **Conservation International (2018)** *Irrecoverable Carbon* Data: https://doi.org/10.1038/s41893-021-00803-6, License: CC-BY-NC
|
| 14 |
+
|
| 15 |
+
4. **US Council on Environmental Quality (2022)** *Climate and Economic Justice Screening Tool, Justice40*. Archived description: https://web.archive.org/web/20250121194509/https://screeningtool.geoplatform.gov/en/methodology#3/33.47/-97.5. Data: https://beta.source.coop/repositories/cboettig/justice40/description/, License: Public Domain
|
| 16 |
+
|
| 17 |
+
5. **Centers for Disease Control and Prevention (CDC) (2022)** *Social Vulnerability Index by US Census Tract*. Archived description: https://web.archive.org/web/20250126095916/https://www.atsdr.cdc.gov/place-health/php/svi/index.html. Data: https://source.coop/repositories/cboettig/social-vulnerability/description. License: Public Domain
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#### LLMs
|
| 21 |
+
This app can use a selection of open-weights language models hosted on the National Research Platform (https://nrp.ai/documentation/userdocs/ai/llm-managed/), and Open Router (https://openrouter.ai/models).
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
### Why save your queries?
|
| 26 |
+
Conservation researchers and practitioners are interested in **learning what matters most to our community**.
|
| 27 |
+
|
| 28 |
+
By saving your anonymous queries, we can identify which topics and areas are drawing the most attention, helping us improve future tools and data products to **better support conservation efforts**. We also save the LLM’s response to each query to monitor its accuracy and ensure the system is working as intended.
|
| 29 |
+
|
| 30 |
+
You can opt out at any time by disabling “Save query”.
|
app/variables.py
CHANGED
|
@@ -267,40 +267,16 @@ data_policy = {
|
|
| 267 |
}
|
| 268 |
|
| 269 |
llm_options = {
|
| 270 |
-
|
| 271 |
-
model="
|
| 272 |
api_key=openrouter_api,
|
| 273 |
base_url=openrouter_endpoint,
|
| 274 |
temperature=0,
|
| 275 |
extra_body=data_policy
|
| 276 |
),
|
| 277 |
|
| 278 |
-
"
|
| 279 |
-
model="
|
| 280 |
-
api_key=openrouter_api,
|
| 281 |
-
base_url=openrouter_endpoint,
|
| 282 |
-
temperature=0,
|
| 283 |
-
extra_body=data_policy
|
| 284 |
-
),
|
| 285 |
-
|
| 286 |
-
"gpt-oss-20b": ChatOpenAI(
|
| 287 |
-
model="openai/gpt-oss-20b:free",
|
| 288 |
-
api_key=openrouter_api,
|
| 289 |
-
base_url=openrouter_endpoint,
|
| 290 |
-
temperature=0,
|
| 291 |
-
extra_body=data_policy
|
| 292 |
-
),
|
| 293 |
-
|
| 294 |
-
"qwen3-coder": ChatOpenAI(
|
| 295 |
-
model="qwen/qwen3-coder:free",
|
| 296 |
-
api_key=openrouter_api,
|
| 297 |
-
base_url=openrouter_endpoint,
|
| 298 |
-
temperature=0,
|
| 299 |
-
extra_body=data_policy
|
| 300 |
-
),
|
| 301 |
-
|
| 302 |
-
"dolphin-mistral-24b-venice-edition": ChatOpenAI(
|
| 303 |
-
model="cognitivecomputations/dolphin-mistral-24b-venice-edition:free",
|
| 304 |
api_key=openrouter_api,
|
| 305 |
base_url=openrouter_endpoint,
|
| 306 |
temperature=0,
|
|
@@ -314,7 +290,7 @@ llm_options = {
|
|
| 314 |
temperature=0,
|
| 315 |
extra_body=data_policy
|
| 316 |
),
|
| 317 |
-
|
| 318 |
"gemma-3-27b-it": ChatOpenAI(
|
| 319 |
model="gemma3",
|
| 320 |
api_key=api_key,
|
|
@@ -322,24 +298,4 @@ llm_options = {
|
|
| 322 |
temperature=0
|
| 323 |
),
|
| 324 |
|
| 325 |
-
|
| 326 |
-
model="gpt-oss",
|
| 327 |
-
api_key=api_key,
|
| 328 |
-
base_url=nrp_endpoint,
|
| 329 |
-
temperature=0
|
| 330 |
-
),
|
| 331 |
-
|
| 332 |
-
"glm-4.6-gptq-int4-int8mix": ChatOpenAI(
|
| 333 |
-
model="glm-4.6",
|
| 334 |
-
api_key=api_key,
|
| 335 |
-
base_url=nrp_endpoint,
|
| 336 |
-
temperature=0
|
| 337 |
-
),
|
| 338 |
-
|
| 339 |
-
"glm-4.5v-fp8": ChatOpenAI(
|
| 340 |
-
model="glm-v",
|
| 341 |
-
api_key=api_key,
|
| 342 |
-
base_url=nrp_endpoint,
|
| 343 |
-
temperature=0
|
| 344 |
-
),
|
| 345 |
-
}
|
|
|
|
| 267 |
}
|
| 268 |
|
| 269 |
llm_options = {
|
| 270 |
+
"devstral-2512": ChatOpenAI(
|
| 271 |
+
model="mistralai/devstral-2512:free",
|
| 272 |
api_key=openrouter_api,
|
| 273 |
base_url=openrouter_endpoint,
|
| 274 |
temperature=0,
|
| 275 |
extra_body=data_policy
|
| 276 |
),
|
| 277 |
|
| 278 |
+
"trinity-mini": ChatOpenAI(
|
| 279 |
+
model="arcee-ai/trinity-mini:free",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
api_key=openrouter_api,
|
| 281 |
base_url=openrouter_endpoint,
|
| 282 |
temperature=0,
|
|
|
|
| 290 |
temperature=0,
|
| 291 |
extra_body=data_policy
|
| 292 |
),
|
| 293 |
+
|
| 294 |
"gemma-3-27b-it": ChatOpenAI(
|
| 295 |
model="gemma3",
|
| 296 |
api_key=api_key,
|
|
|
|
| 298 |
temperature=0
|
| 299 |
),
|
| 300 |
|
| 301 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -1,19 +1,18 @@
|
|
| 1 |
git+https://github.com/boettiger-lab/cng-python
|
| 2 |
-
leafmap==0.53.3
|
| 3 |
-
ibis-framework[duckdb]==10.3.1
|
| 4 |
-
lonboard==0.10.4
|
| 5 |
altair==5.3.0
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
shiny==0.10.2
|
| 9 |
-
geoarrow-types==0.2.0
|
| 10 |
geoarrow-pandas==0.1.1
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 13 |
langchain==0.2.17
|
| 14 |
langchain-community==0.2.19
|
| 15 |
langchain-core==0.2.43
|
| 16 |
langchain-openai==0.1.25
|
| 17 |
-
|
|
|
|
| 18 |
minio==7.2.15
|
| 19 |
-
|
|
|
|
|
|
|
|
|
| 1 |
git+https://github.com/boettiger-lab/cng-python
|
|
|
|
|
|
|
|
|
|
| 2 |
altair==5.3.0
|
| 3 |
+
duckdb==1.2.2
|
| 4 |
+
duckdb_engine==0.15.0
|
|
|
|
|
|
|
| 5 |
geoarrow-pandas==0.1.1
|
| 6 |
+
geoarrow-types==0.2.0
|
| 7 |
+
git+https://github.com/boettiger-lab/cng-python
|
| 8 |
+
ibis-framework[duckdb]==10.3.1
|
| 9 |
langchain==0.2.17
|
| 10 |
langchain-community==0.2.19
|
| 11 |
langchain-core==0.2.43
|
| 12 |
langchain-openai==0.1.25
|
| 13 |
+
leafmap==0.53.3
|
| 14 |
+
lonboard==0.10.4
|
| 15 |
minio==7.2.15
|
| 16 |
+
shiny==0.10.2
|
| 17 |
+
SQLAlchemy==2.0.35
|
| 18 |
+
streamlit==1.50.0
|