Wootang01 commited on
Commit
a28b188
1 Parent(s): 29de8f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -22,7 +22,7 @@ model_list = ['xlm-roberta-large-finetuned-conll03-english', 'xlm-roberta-large'
22
  st.sidebar.header("Vocabulary categorizer")
23
  model_checkpoint = st.sidebar.radio("", model_list)
24
 
25
- st.sidebar.write("Which model highlights the most vocabulary words? Which model highlights the most accurately?")
26
  st.sidebar.write("")
27
 
28
  xlm_agg_strategy_info = "'aggregation_strategy' can be selected as 'simple' or 'none' for 'xlm-roberta'."
@@ -38,14 +38,14 @@ elif model_checkpoint == "xlm-roberta-large":
38
  st.sidebar.write("")
39
 
40
  st.subheader("Select Text Input Method")
41
- input_method = st.radio("", ('Select from Examples', 'Write or Paste New Text'))
42
  if input_method == 'Select from Examples':
43
- selected_text = st.selectbox('Select Text from List', example_list, index=0, key=1)
44
  st.subheader("Text to Run")
45
- input_text = st.text_area("Selected Text", selected_text, height=128, max_chars=None, key=2)
46
  elif input_method == "Write or Paste New Text":
47
- st.subheader("Text to Run")
48
- input_text = st.text_area('Write or Paste Text Below', value="", height=128, max_chars=None, key=2)
49
 
50
  @st.cache(allow_output_mutation=True)
51
  def setModel(model_checkpoint, aggregation):
@@ -59,7 +59,7 @@ def get_html(html: str):
59
  html = html.replace("\n", " ")
60
  return WRAPPER.format(html)
61
 
62
- Run_Button = st.button("Run", key=None)
63
  if Run_Button == True:
64
 
65
  ner_pipeline = setModel(model_checkpoint, aggregation)
 
22
  st.sidebar.header("Vocabulary categorizer")
23
  model_checkpoint = st.sidebar.radio("", model_list)
24
 
25
+ st.sidebar.write("Which model highlights the most nouns? Which model highlights nouns the most accurately?")
26
  st.sidebar.write("")
27
 
28
  xlm_agg_strategy_info = "'aggregation_strategy' can be selected as 'simple' or 'none' for 'xlm-roberta'."
 
38
  st.sidebar.write("")
39
 
40
  st.subheader("Select Text Input Method")
41
+ input_method = st.radio("", ('Select from examples', 'Write or paste text'))
42
  if input_method == 'Select from Examples':
43
+ selected_text = st.selectbox('Select example from list', example_list, index=0, key=1)
44
  st.subheader("Text to Run")
45
+ input_text = st.text_area("Selected example", selected_text, height=128, max_chars=None, key=2)
46
  elif input_method == "Write or Paste New Text":
47
+ st.subheader("Text Input")
48
+ input_text = st.text_area('Write or paste text below', value="", height=128, max_chars=None, key=2)
49
 
50
  @st.cache(allow_output_mutation=True)
51
  def setModel(model_checkpoint, aggregation):
 
59
  html = html.replace("\n", " ")
60
  return WRAPPER.format(html)
61
 
62
+ Run_Button = st.button("Submit", key=None)
63
  if Run_Button == True:
64
 
65
  ner_pipeline = setModel(model_checkpoint, aggregation)