Spaces:
Runtime error
Runtime error
Commit
·
af7fb4d
1
Parent(s):
3e293df
fixs issue
Browse files
app.py
CHANGED
|
@@ -53,14 +53,17 @@ def main():
|
|
| 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 |
example = examples[random.randint(0, len(examples)-1)]
|
| 56 |
-
|
|
|
|
| 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 st.button('Split✂️'):
|
| 61 |
with st.spinner("Spliting Sentence...🧠"):
|
| 62 |
generated_sentence = load_model(input_complex_sentence, model)
|
| 63 |
-
sentence1, sentence2 =
|
| 64 |
st.write("**Sentence1:** "+sentence1+".")
|
| 65 |
st.write("**Sentence2:** "+sentence2)
|
| 66 |
|
|
|
|
| 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 |
example = examples[random.randint(0, len(examples)-1)]
|
| 56 |
+
previous_example = example
|
| 57 |
+
while change_example or example==previous_example:
|
| 58 |
example = examples[random.randint(0, len(examples)-1)]
|
| 59 |
+
change_example=False
|
| 60 |
+
previous_example = example
|
| 61 |
input_complex_sentence = st.text_area("Please type a Complex Sentence to split",example)
|
| 62 |
|
| 63 |
if st.button('Split✂️'):
|
| 64 |
with st.spinner("Spliting Sentence...🧠"):
|
| 65 |
generated_sentence = load_model(input_complex_sentence, model)
|
| 66 |
+
sentence1, sentence2 = generated_sentence.split(".")
|
| 67 |
st.write("**Sentence1:** "+sentence1+".")
|
| 68 |
st.write("**Sentence2:** "+sentence2)
|
| 69 |
|