Update app.py
Browse files
app.py
CHANGED
|
@@ -73,25 +73,17 @@ def main():
|
|
| 73 |
# Entity Extraction
|
| 74 |
text = st.text_input("Type your text!")
|
| 75 |
if st.checkbox("Show Named Entities"):
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
entity_result = entity_analyzer(text)
|
| 79 |
-
st.json(entity_result)
|
| 80 |
# Sentiment Analysis
|
| 81 |
if st.checkbox("Show Sentiment Analysis"):
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
result_sentiment = blob.sentiment
|
| 86 |
-
st.success(result_sentiment)
|
| 87 |
#Text Corrections
|
| 88 |
if st.checkbox("Spell Corrections"):
|
| 89 |
-
|
| 90 |
-
if st.button("Spell Corrections"):
|
| 91 |
-
st.text("Using TextBlob ..")
|
| 92 |
-
st.success(TextBlob(text).correct())
|
| 93 |
if st.checkbox("Text Generation"):
|
| 94 |
-
st.subheader("Generate Text")
|
| 95 |
ok = st.button("Generate")
|
| 96 |
tokenizer, model = load_models()
|
| 97 |
if ok:
|
|
|
|
| 73 |
# Entity Extraction
|
| 74 |
text = st.text_input("Type your text!")
|
| 75 |
if st.checkbox("Show Named Entities"):
|
| 76 |
+
entity_result = entity_analyzer(text)
|
| 77 |
+
st.json(entity_result)
|
|
|
|
|
|
|
| 78 |
# Sentiment Analysis
|
| 79 |
if st.checkbox("Show Sentiment Analysis"):
|
| 80 |
+
blob = TextBlob(text)
|
| 81 |
+
result_sentiment = blob.sentiment
|
| 82 |
+
st.success(result_sentiment)
|
|
|
|
|
|
|
| 83 |
#Text Corrections
|
| 84 |
if st.checkbox("Spell Corrections"):
|
| 85 |
+
st.success(TextBlob(text).correct())
|
|
|
|
|
|
|
|
|
|
| 86 |
if st.checkbox("Text Generation"):
|
|
|
|
| 87 |
ok = st.button("Generate")
|
| 88 |
tokenizer, model = load_models()
|
| 89 |
if ok:
|