Soumen commited on
Commit
55e5b53
1 Parent(s): cb52c89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -14
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
- st.subheader("Analyze Your Text")
77
- if st.button("Extract"):
78
- entity_result = entity_analyzer(text)
79
- st.json(entity_result)
80
  # Sentiment Analysis
81
  if st.checkbox("Show Sentiment Analysis"):
82
- st.subheader("Analyse Your Text")
83
- if st.button("Analyze"):
84
- blob = TextBlob(text)
85
- result_sentiment = blob.sentiment
86
- st.success(result_sentiment)
87
  #Text Corrections
88
  if st.checkbox("Spell Corrections"):
89
- st.subheader("Correct Your Text")
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: