wzkariampuzha commited on
Commit
ddff90b
1 Parent(s): 246fd51

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -0
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import classify_abs
3
+ #classify_abs is a dependency for extract_abs
4
+ import extract_abs
5
+ pd.set_option('display.max_colwidth', None)
6
+ import streamlit as st
7
+
8
+ #LSTM RNN Epi Classifier Model
9
+ classify_model_vars = classify_abs.init_classify_model()
10
+
11
+ #GARD Dictionary - For filtering and exact match disease/GARD ID identification
12
+ GARD_dict, max_length = extract_abs.load_GARD_diseases()
13
+
14
+ #BioBERT-based NER pipeline, open `entities` to see
15
+ NER_pipeline, entity_classes = extract_abs.init_NER_pipeline()
16
+
17
+ #max_results is Maximum number of PubMed ID's to retrieve BEFORE filtering
18
+
19
+ #filtering options are 'strict','lenient'(default), 'none'
20
+ if text:
21
+ out = extract_abs.search_term_extraction(term, max_results, filtering,
22
+ NER_pipeline, entity_classes,
23
+ extract_diseases,GARD_dict, max_length,
24
+ classify_model_vars)
25
+ st.(out)