From 8c4778e966ae7129d7ace450e2c2bd16daf6d7ff Mon Sep 17 00:00:00 2001 From: Charlie Date: Sat, 31 Jan 2026 14:25:14 -0500 Subject: [PATCH 1/3] Switch species tree to Archaeopteryx.js --- app/nl_query.py | 4 ++- app/templates/show_species.html | 44 +++++++++++++++++++++------------ 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/app/nl_query.py b/app/nl_query.py index 606e381..2b3b9fe 100644 --- a/app/nl_query.py +++ b/app/nl_query.py @@ -53,7 +53,8 @@ class State(TypedDict): ] ) -GENERATE_QUERY_PROMPT = lambda user_input: f""" +GENERATE_QUERY_PROMPT = ( + lambda user_input: f""" ``` SYSTEM Given an input question, create a syntactically correct SQLite3 query to run to help find the answer. Unless the user specifies in his question a specific number of examples they wish to obtain, you can return all the results that match the question. @@ -69,6 +70,7 @@ class State(TypedDict): {user_input} ``` """ +) llm = ChatOpenAI( model="gpt-4o", diff --git a/app/templates/show_species.html b/app/templates/show_species.html index 308a1c0..a835784 100644 --- a/app/templates/show_species.html +++ b/app/templates/show_species.html @@ -2,9 +2,9 @@ {% block head %} {% endblock %} @@ -37,21 +37,33 @@

Tree

{% elif tree_content %}

Source: {{ tree_path.rsplit('/', 1)[-1] }}

- - - - + + + + + + + + + {% elif tree_root %}

No treefile found for this species.

From 8712e2774640a604941314a7d63206fa19ed371e Mon Sep 17 00:00:00 2001 From: Charlie Date: Sat, 31 Jan 2026 14:35:09 -0500 Subject: [PATCH 2/3] Fill Archaeopteryx tree container --- app/templates/show_species.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/templates/show_species.html b/app/templates/show_species.html index a835784..4a3f432 100644 --- a/app/templates/show_species.html +++ b/app/templates/show_species.html @@ -7,6 +7,16 @@ integrity="sha384-Wdf9be1Zb3KyYwg8A+RZyGXu7V52PYvfwVvmBllPV+Zt39d2+PnJpzm8v6ZEbIIW" crossorigin="anonymous" > + {% endblock %} {% block body %} @@ -64,6 +74,11 @@

Tree

}; $("#phy_b, #cla_b, #phya_b").checkboxradio({ icon: false }); archaeopteryx.launch(`#${container.id}`, tree, options, settings, []); + const svg = container.querySelector("svg"); + if (svg) { + svg.setAttribute("width", "100%"); + svg.setAttribute("height", "100%"); + } {% elif tree_root %}

No treefile found for this species.

From 96dbd904b8e881e2b76092d637dae93e9cc7079d Mon Sep 17 00:00:00 2001 From: Charlie Date: Sat, 31 Jan 2026 14:53:01 -0500 Subject: [PATCH 3/3] Load Archaeopteryx assets from jsDelivr --- app/templates/base.html | 6 ++- app/templates/show_species.html | 81 +++++++++++++++++++++------------ 2 files changed, 57 insertions(+), 30 deletions(-) diff --git a/app/templates/base.html b/app/templates/base.html index bfb84ee..c5e01f3 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -15,7 +15,11 @@ crossorigin="anonymous" > - + diff --git a/app/templates/show_species.html b/app/templates/show_species.html index 4a3f432..d219aab 100644 --- a/app/templates/show_species.html +++ b/app/templates/show_species.html @@ -2,7 +2,7 @@ {% block head %} Tree {% elif tree_content %}

Source: {{ tree_path.rsplit('/', 1)[-1] }}

-