glitch0011 commited on
Commit
b7f70e6
·
1 Parent(s): e010ab9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -8,16 +8,6 @@ basemodel = pipeline("ner", model="/home/user/app/base-model/", tokenizer="indol
8
 
9
 
10
  st.title(':blue[MendoBERT] - Named Entity Recognition Model :sunglasses:')
11
- with st.container():
12
- example1 = st.button('Aspartylglucosaminuria (AGU) adalah gangguan metabolisme glikoprotein langka.', use_container_width=True)
13
- example2 = st.button('Mutasi germ - line dari gen BRCA1 membuat wanita cenderung mengalami kanker payudara dini dengan mengorbankan fungsi presumtif gen sebagai penekan tumor.', use_container_width=True)
14
- if example1:
15
- text = st.text_area('Enter some text: ', 'Aspartylglucosaminuria (AGU) adalah gangguan metabolisme glikoprotein langka.')
16
- elif example2:
17
- text = st.text_area('Enter some text: ', 'Mutasi germ - line dari gen BRCA1 membuat wanita cenderung mengalami kanker payudara dini dengan mengorbankan fungsi presumtif gen sebagai penekan tumor.')
18
- else:
19
- text = st.text_area('Enter some text: ', 'Enter your texts here...')
20
-
21
  if text:
22
  ner_results = model(text)
23
  ner_results2 = basemodel(text)
@@ -95,13 +85,22 @@ if text:
95
  formatBase = format_span_box_markup(text, spanBase)
96
  htmlBase = ''.join(formatBase)
97
 
98
- st.divider()
99
  st.subheader('MendoBERT')
100
  st.json(mendo)
101
  st.markdown(htmlMendo,unsafe_allow_html=True)
102
- st.divider()
103
  st.subheader('IndoLEM')
104
  st.json(base)
105
  st.markdown(htmlBase,unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
106
 
107
 
 
8
 
9
 
10
  st.title(':blue[MendoBERT] - Named Entity Recognition Model :sunglasses:')
 
 
 
 
 
 
 
 
 
 
11
  if text:
12
  ner_results = model(text)
13
  ner_results2 = basemodel(text)
 
85
  formatBase = format_span_box_markup(text, spanBase)
86
  htmlBase = ''.join(formatBase)
87
 
 
88
  st.subheader('MendoBERT')
89
  st.json(mendo)
90
  st.markdown(htmlMendo,unsafe_allow_html=True)
 
91
  st.subheader('IndoLEM')
92
  st.json(base)
93
  st.markdown(htmlBase,unsafe_allow_html=True)
94
+
95
+ with st.container():
96
+ example1 = st.button('Aspartylglucosaminuria (AGU) adalah gangguan metabolisme glikoprotein langka.', use_container_width=True)
97
+ example2 = st.button('Mutasi germ - line dari gen BRCA1 membuat wanita cenderung mengalami kanker payudara dini dengan mengorbankan fungsi presumtif gen sebagai penekan tumor.', use_container_width=True)
98
+ if example1:
99
+ text = st.text_area('Enter some text: ', 'Aspartylglucosaminuria (AGU) adalah gangguan metabolisme glikoprotein langka.')
100
+ elif example2:
101
+ text = st.text_area('Enter some text: ', 'Mutasi germ - line dari gen BRCA1 membuat wanita cenderung mengalami kanker payudara dini dengan mengorbankan fungsi presumtif gen sebagai penekan tumor.')
102
+ else:
103
+ text = st.text_area('Enter some text: ', 'Enter your texts here...')
104
+
105
 
106