jonasburian commited on
Commit
4bb328e
Β·
verified Β·
1 Parent(s): b37ad12

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -9
src/streamlit_app.py CHANGED
@@ -1,9 +1,3 @@
1
- """
2
- Enhanced Streamlit app for biomedical ontology retrieval on Hugging Face
3
- Supports multiple vocabularies with precomputed embeddings and t-SNE visualization
4
- Now supports multiple embedding models: BRIDGE, SapBERT, and OpenAI
5
- """
6
-
7
  import streamlit as st
8
  import pandas as pd
9
  import numpy as np
@@ -34,7 +28,6 @@ MODELS_CONFIG = {
34
  "openai": {
35
  "display_name": "OpenAI",
36
  "type": "openai",
37
- # name of the embeddings model to use (must match your account/model availability)
38
  "model": "text-embedding-3-large"
39
  }
40
  }
@@ -487,7 +480,7 @@ def main():
487
  # Info in sidebar
488
  st.sidebar.success(f"βœ“ Loaded {len(df_concepts)} concepts")
489
  st.sidebar.info(f"πŸ“Š Active vocabularies: {len(selected_vocabs)}")
490
- st.sidebar.info(f"πŸ€– Model: {selected_model_name}\nπŸ’» Device: {device}")
491
 
492
  # Display vocabulary statistics
493
  with st.sidebar.expander("πŸ“ˆ Vocabulary Statistics"):
@@ -499,7 +492,7 @@ def main():
499
  st.subheader("πŸ” Query")
500
  user_input = st.text_area(
501
  "Enter clinical or biomedical text:",
502
- placeholder="e.g., Migraine with aura",
503
  height=120,
504
  help="Enter any clinical description or biomedical concept to find similar codes"
505
  )
 
 
 
 
 
 
 
1
  import streamlit as st
2
  import pandas as pd
3
  import numpy as np
 
28
  "openai": {
29
  "display_name": "OpenAI",
30
  "type": "openai",
 
31
  "model": "text-embedding-3-large"
32
  }
33
  }
 
480
  # Info in sidebar
481
  st.sidebar.success(f"βœ“ Loaded {len(df_concepts)} concepts")
482
  st.sidebar.info(f"πŸ“Š Active vocabularies: {len(selected_vocabs)}")
483
+ st.sidebar.info(f"Model: {selected_model_name}\n Device: {device}")
484
 
485
  # Display vocabulary statistics
486
  with st.sidebar.expander("πŸ“ˆ Vocabulary Statistics"):
 
492
  st.subheader("πŸ” Query")
493
  user_input = st.text_area(
494
  "Enter clinical or biomedical text:",
495
+ placeholder="e.g. "Migraine with aura" or "ICD10 G43.1"",
496
  height=120,
497
  help="Enter any clinical description or biomedical concept to find similar codes"
498
  )