Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -127,7 +127,8 @@ with st.container():
|
|
| 127 |
btnPastHistory = st.button('📇Past History (6 Mths)')
|
| 128 |
if btnPastHistory:
|
| 129 |
inputNote = "Input History records"
|
| 130 |
-
|
|
|
|
| 131 |
if btnPastHistory:
|
| 132 |
st.text_area('Past History','Date of discharge: xxxxxxxxx')
|
| 133 |
|
|
@@ -146,7 +147,7 @@ with st.container():
|
|
| 146 |
#st.selectbox('Past Episodes',pastHistoryEp)
|
| 147 |
pastHistory = st.sidebar.selectbox(' ', pastHistoryEpid)
|
| 148 |
|
| 149 |
-
|
| 150 |
|
| 151 |
|
| 152 |
# Extract words associated with each entity
|
|
@@ -164,7 +165,13 @@ def genEntities(ann, entity):
|
|
| 164 |
|
| 165 |
|
| 166 |
##======================== Start of NER Tagging ========================
|
| 167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
#lemmatizing the notes to capture all forms of negation(e.g., deny: denies, denying)
|
| 169 |
def lemmatize(note, nlp):
|
| 170 |
doc = nlp(note)
|
|
@@ -282,12 +289,7 @@ def run_model(input_text):
|
|
| 282 |
|
| 283 |
|
| 284 |
st.success(output)
|
| 285 |
-
|
| 286 |
-
#doc = nlp(str(original_text2))
|
| 287 |
-
#colors = { "DISEASE": "pink","CHEMICAL": "orange"}
|
| 288 |
-
#options = {"ents": [ "DISEASE", "CHEMICAL"],"colors": colors}
|
| 289 |
-
#ent_html = displacy.render(doc, style="ent", options=options)
|
| 290 |
-
# ====== End of Old NER ======
|
| 291 |
|
| 292 |
col1, col2 = st.columns([1,1])
|
| 293 |
|
|
|
|
| 127 |
btnPastHistory = st.button('📇Past History (6 Mths)')
|
| 128 |
if btnPastHistory:
|
| 129 |
inputNote = "Input History records"
|
| 130 |
+
|
| 131 |
+
##========= on Past History Tab =========
|
| 132 |
if btnPastHistory:
|
| 133 |
st.text_area('Past History','Date of discharge: xxxxxxxxx')
|
| 134 |
|
|
|
|
| 147 |
#st.selectbox('Past Episodes',pastHistoryEp)
|
| 148 |
pastHistory = st.sidebar.selectbox(' ', pastHistoryEpid)
|
| 149 |
|
| 150 |
+
##========= END on Past History Tab =========
|
| 151 |
|
| 152 |
|
| 153 |
# Extract words associated with each entity
|
|
|
|
| 165 |
|
| 166 |
|
| 167 |
##======================== Start of NER Tagging ========================
|
| 168 |
+
# ====== Old NER ======
|
| 169 |
+
#doc = nlp(str(original_text2))
|
| 170 |
+
#colors = { "DISEASE": "pink","CHEMICAL": "orange"}
|
| 171 |
+
#options = {"ents": [ "DISEASE", "CHEMICAL"],"colors": colors}
|
| 172 |
+
#ent_html = displacy.render(doc, style="ent", options=options)
|
| 173 |
+
# ====== End of Old NER ======
|
| 174 |
+
|
| 175 |
#lemmatizing the notes to capture all forms of negation(e.g., deny: denies, denying)
|
| 176 |
def lemmatize(note, nlp):
|
| 177 |
doc = nlp(note)
|
|
|
|
| 289 |
|
| 290 |
|
| 291 |
st.success(output)
|
| 292 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
|
| 294 |
col1, col2 = st.columns([1,1])
|
| 295 |
|