Spaces:
Runtime error
Runtime error
Commit
·
f68e3a4
1
Parent(s):
e2f0e5c
try new fix
Browse files
app.py
CHANGED
@@ -27,8 +27,6 @@ def main():
|
|
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.sidebar.button("Try Different Example")
|
31 |
-
|
32 |
st.sidebar.write('''
|
33 |
## Applications:
|
34 |
* Sentence Simplification
|
@@ -52,12 +50,15 @@ def main():
|
|
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:
|
57 |
example = examples[random.randint(0, len(examples)-1)]
|
|
|
|
|
58 |
input_complex_sentence = st.text_area("Please type a Complex Sentence to split",example)
|
59 |
|
60 |
-
if
|
61 |
with st.spinner("Spliting Sentence...🧠"):
|
62 |
generated_sentence = load_model(input_complex_sentence, model)
|
63 |
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 |
st.sidebar.write('''
|
31 |
## Applications:
|
32 |
* Sentence Simplification
|
|
|
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(".")
|