Spaces:
Runtime error
Runtime error
Commit
·
7cf2f94
1
Parent(s):
f68e3a4
try2
Browse files
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 |
-
|
54 |
-
change_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
|
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(".")
|