bhadresh-savani commited on
Commit
7cf2f94
·
1 Parent(s): f68e3a4
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -27,6 +27,8 @@ def main():
27
  "Please Choose the Model",
28
  ("t5-base-wikisplit","t5-v1_1-base-wikisplit", "byt5-base-wikisplit","t5-large-wikisplit"))
29
 
 
 
30
  st.sidebar.write('''
31
  ## Applications:
32
  * Sentence Simplification
@@ -50,15 +52,14 @@ def main():
50
  "'' '' New York Mining Disaster 1941 '' '' was the second EP released by the Bee Gees in 1967 on the Spin Records , like their first EP , it was released only in Australia .",
51
  "'' ADAPTOGENS : Herbs for Strength , Stamina , and Stress Relief , '' Healing Arts Press , 2007 - contains a detailed monograph on Schisandra chinensis as well as highlights health benefits ."
52
  ]
53
- col1, col2 = st.beta_columns(2)
54
- change_example = col2.button("Try Different Example")
55
- if change_example:
56
  example = examples[random.randint(0, len(examples)-1)]
57
  else:
58
  example=examples[0]
59
  input_complex_sentence = st.text_area("Please type a Complex Sentence to split",example)
60
 
61
- if col1.button('Split✂️'):
62
  with st.spinner("Spliting Sentence...🧠"):
63
  generated_sentence = load_model(input_complex_sentence, model)
64
  sentence1, sentence2, _ = generated_sentence.split(".")
 
27
  "Please Choose the Model",
28
  ("t5-base-wikisplit","t5-v1_1-base-wikisplit", "byt5-base-wikisplit","t5-large-wikisplit"))
29
 
30
+ change_example = st.radio("Try Random Examples", ["Yes", "No"], index=1)
31
+
32
  st.sidebar.write('''
33
  ## Applications:
34
  * Sentence Simplification
 
52
  "'' '' New York Mining Disaster 1941 '' '' was the second EP released by the Bee Gees in 1967 on the Spin Records , like their first EP , it was released only in Australia .",
53
  "'' ADAPTOGENS : Herbs for Strength , Stamina , and Stress Relief , '' Healing Arts Press , 2007 - contains a detailed monograph on Schisandra chinensis as well as highlights health benefits ."
54
  ]
55
+
56
+ if change_example=="Yes":
 
57
  example = examples[random.randint(0, len(examples)-1)]
58
  else:
59
  example=examples[0]
60
  input_complex_sentence = st.text_area("Please type a Complex Sentence to split",example)
61
 
62
+ if st.button('Split✂️'):
63
  with st.spinner("Spliting Sentence...🧠"):
64
  generated_sentence = load_model(input_complex_sentence, model)
65
  sentence1, sentence2, _ = generated_sentence.split(".")