Builds PaperTrail from the base skeleton into a full evidence-verification platform for the "Built with Claude: Life Sciences" hackathon (Builder Track). New named-user features (Build Beyond the Bench): - Lab Notebook Companion — rough bench notes -> structured, searchable, grounded experiment records (lib/labNotebook, /console/lab-notebook, migration 0059) - Clinical Trial Matcher — de-identified patient notes -> ranked eligible ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning (lib/trialMatcher, /console/trial-matcher, migrations 0060) Platform: - Deterministic verification moat (biostats recompute, exact-span grounding) - 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar, PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier) - Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise governance (RBAC, /api/v1 gateway, metering, audit chain, retention) - 17 OSS projects assimilated into native TypeScript on our stack (backend/engines retained + credited in NOTICE) - Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site - Next.js 16 upgrade, benchmark harness (honest smoke-test caveat) Licensing: Apache-2.0 (LICENSE + NOTICE).
69 lines
2.2 KiB
Python
69 lines
2.2 KiB
Python
import os
|
|
|
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
wiki_root_dir = os.path.dirname(os.path.dirname(script_dir))
|
|
|
|
import demo_util
|
|
from pages_util import MyArticles, CreateNewArticle
|
|
from streamlit_float import *
|
|
from streamlit_option_menu import option_menu
|
|
|
|
|
|
def main():
|
|
global database
|
|
st.set_page_config(layout="wide")
|
|
|
|
if "first_run" not in st.session_state:
|
|
st.session_state["first_run"] = True
|
|
|
|
# set api keys from secrets
|
|
if st.session_state["first_run"]:
|
|
for key, value in st.secrets.items():
|
|
if type(value) == str:
|
|
os.environ[key] = value
|
|
|
|
# initialize session_state
|
|
if "selected_article_index" not in st.session_state:
|
|
st.session_state["selected_article_index"] = 0
|
|
if "selected_page" not in st.session_state:
|
|
st.session_state["selected_page"] = 0
|
|
if st.session_state.get("rerun_requested", False):
|
|
st.session_state["rerun_requested"] = False
|
|
st.rerun()
|
|
|
|
st.write(
|
|
"<style>div.block-container{padding-top:2rem;}</style>", unsafe_allow_html=True
|
|
)
|
|
menu_container = st.container()
|
|
with menu_container:
|
|
pages = ["My Articles", "Create New Article"]
|
|
styles = {
|
|
"container": {"padding": "0.2rem 0", "background-color": "#22222200"},
|
|
}
|
|
menu_selection = option_menu(
|
|
None,
|
|
pages,
|
|
icons=["house", "search"],
|
|
menu_icon="cast",
|
|
default_index=0,
|
|
orientation="horizontal",
|
|
manual_select=st.session_state.selected_page,
|
|
styles=styles,
|
|
key="menu_selection",
|
|
)
|
|
if st.session_state.get("manual_selection_override", False):
|
|
menu_selection = pages[st.session_state["selected_page"]]
|
|
st.session_state["manual_selection_override"] = False
|
|
st.session_state["selected_page"] = None
|
|
|
|
if menu_selection == "My Articles":
|
|
demo_util.clear_other_page_session_state(page_index=2)
|
|
MyArticles.my_articles_page()
|
|
elif menu_selection == "Create New Article":
|
|
demo_util.clear_other_page_session_state(page_index=3)
|
|
CreateNewArticle.create_new_article_page()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|