[d69072]: / app / demo_models.py

Download this file

34 lines (21 with data), 784 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import streamlit as st
from inference import detect_concept
HTML_WRAPPER = """<div style="overflow-x: auto; border: 1px solid #e6e9ef; border-radius: 0.25rem; padding: 1rem">{}</div>"""
def main():
"""Concept Streamlit App"""
st.title("Concept Checker")
activities = ["Concept","Assertion","Relation"]
choice = st.sidebar.selectbox("Select Activity", activities)
if choice == 'Concept':
output = []
st.subheader("Medical Concepts")
raw_text = st.text_area("Enter Text Here","Type Here")
if st.button("Summarize"):
ner_result = detect_concept(raw_text)
# TODO: format the result for NER
result = "..."
st.write(result)
if choice == 'Assertion':
if choice == 'Relation':
if __name__ == '__main__':
main()