Spaces:
Runtime error
Runtime error
Commit
·
814e62c
1
Parent(s):
698432b
updated UI
Browse files
app.py
CHANGED
|
@@ -17,20 +17,20 @@ def load_model(input_complex_sentence,model):
|
|
| 17 |
|
| 18 |
def main():
|
| 19 |
|
| 20 |
-
st.title("
|
| 21 |
st.write("Sentence Split is the task of dividing a long Sentence into multiple Sentences")
|
| 22 |
-
|
| 23 |
model = st.sidebar.selectbox(
|
| 24 |
"Please Choose the Model",
|
| 25 |
("t5-base-wikisplit","t5-v1_1-base-wikisplit", "byt5-base-wikisplit","t5-large-wikisplit"))
|
| 26 |
-
|
| 27 |
-
|
| 28 |
example = "Mary likes to play football in her freetime whenever she meets with her friends that are very nice people."
|
| 29 |
-
input_complex_sentence =
|
| 30 |
|
| 31 |
-
if
|
| 32 |
-
|
| 33 |
-
|
| 34 |
st.write(generated_sentence)
|
| 35 |
|
| 36 |
|
|
|
|
| 17 |
|
| 18 |
def main():
|
| 19 |
|
| 20 |
+
st.title("Sentence Split in English using T5")
|
| 21 |
st.write("Sentence Split is the task of dividing a long Sentence into multiple Sentences")
|
| 22 |
+
form = st.form(key='split_form')
|
| 23 |
model = st.sidebar.selectbox(
|
| 24 |
"Please Choose the Model",
|
| 25 |
("t5-base-wikisplit","t5-v1_1-base-wikisplit", "byt5-base-wikisplit","t5-large-wikisplit"))
|
| 26 |
+
form.write("Model Selected : ", model)
|
| 27 |
+
|
| 28 |
example = "Mary likes to play football in her freetime whenever she meets with her friends that are very nice people."
|
| 29 |
+
input_complex_sentence = form.text_area("Please type a long Sentence to split",example)
|
| 30 |
|
| 31 |
+
if form.form_submit_button('✂️'):
|
| 32 |
+
with st.spinner("Spliting Sentence...🧠"):
|
| 33 |
+
generated_sentence = load_model(input_complex_sentence, model)
|
| 34 |
st.write(generated_sentence)
|
| 35 |
|
| 36 |
|