Diff of /app/demo_models.py [000000] .. [d69072]

Switch to unified view

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