wzkariampuzha commited on
Commit
7ead1f4
1 Parent(s): 999ecf4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -11
app.py CHANGED
@@ -21,18 +21,7 @@ disease_or_gard_id = st.text_input('Input a rare disease term or a GARD ID.', 'F
21
 
22
  # st.code(body, language="python")
23
 
24
- #LSTM RNN Epi Classifier Model
25
- classify_model_vars = classify_abs.init_classify_model()
26
-
27
- #GARD Dictionary - For filtering and exact match disease/GARD ID identification
28
- GARD_dict, max_length = extract_abs.load_GARD_diseases()
29
-
30
- #BioBERT-based NER pipeline, open `entities` to see
31
- NER_pipeline, entity_classes = extract_abs.init_NER_pipeline()
32
 
33
- #max_results is Maximum number of PubMed ID's to retrieve BEFORE filtering
34
- max_results = st.sidebar.number_input(label, min_value=1, max_value=None, value=50)
35
- # https://docs.streamlit.io/library/api-reference/widgets/st.number_input
36
 
37
  # st.radio(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False)
38
  # https://docs.streamlit.io/library/api-reference/widgets/st.radio
@@ -43,6 +32,26 @@ filtering = st.sidebar.radio(
43
  extract_diseases = st.sidebar.checkbox("Extract Rare Diseases", value=False)
44
  # https://docs.streamlit.io/library/api-reference/widgets/st.checkbox
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  #filtering options are 'strict','lenient'(default), 'none'
47
  if text:
48
  df = extract_abs.search_term_extraction(disease_or_gard_id, max_results, filtering,
 
21
 
22
  # st.code(body, language="python")
23
 
 
 
 
 
 
 
 
 
24
 
 
 
 
25
 
26
  # st.radio(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False)
27
  # https://docs.streamlit.io/library/api-reference/widgets/st.radio
 
32
  extract_diseases = st.sidebar.checkbox("Extract Rare Diseases", value=False)
33
  # https://docs.streamlit.io/library/api-reference/widgets/st.checkbox
34
 
35
+ #LSTM RNN Epi Classifier Model
36
+ with st.spinner('Loading Epidemiology Classification Model...'):
37
+ classify_model_vars = classify_abs.init_classify_model()
38
+ st.success('Epidemiology Classification Model Loaded!')
39
+
40
+ #GARD Dictionary - For filtering and exact match disease/GARD ID identification
41
+ with st.spinner('Loading GARD Rare Disease Dictionary...'):
42
+ GARD_dict, max_length = extract_abs.load_GARD_diseases()
43
+ st.success('GARD Rare Disease Dictionary Loaded!')
44
+
45
+
46
+ #BioBERT-based NER pipeline, open `entities` to see
47
+ with st.spinner('Loading Epidemiology Extraction Model...'):
48
+ NER_pipeline, entity_classes = extract_abs.init_NER_pipeline()
49
+ st.success('Epidemiology Extraction Model Loaded!')
50
+
51
+ #max_results is Maximum number of PubMed ID's to retrieve BEFORE filtering
52
+ max_results = st.sidebar.number_input(label, min_value=1, max_value=None, value=50)
53
+ # https://docs.streamlit.io/library/api-reference/widgets/st.number_input
54
+
55
  #filtering options are 'strict','lenient'(default), 'none'
56
  if text:
57
  df = extract_abs.search_term_extraction(disease_or_gard_id, max_results, filtering,