Update app.py
Browse files
app.py
CHANGED
|
@@ -96,14 +96,14 @@ def main():
|
|
| 96 |
#our_image=load_image("image.jpg")
|
| 97 |
#img = cv2.imread("scholarly_text.jpg")
|
| 98 |
text = message
|
| 99 |
-
if st.checkbox("Show Named Entities"):
|
| 100 |
entity_result = entity_analyzer(text)
|
| 101 |
st.json(entity_result)
|
| 102 |
-
if st.checkbox("Show Sentiment Analysis"):
|
| 103 |
blob = TextBlob(text)
|
| 104 |
result_sentiment = blob.sentiment
|
| 105 |
st.success(result_sentiment)
|
| 106 |
-
if st.checkbox("Spell Corrections"):
|
| 107 |
st.success(TextBlob(text).correct())
|
| 108 |
if st.checkbox("Text Generation"):
|
| 109 |
ok = st.button("Generate")
|
|
@@ -120,7 +120,7 @@ def main():
|
|
| 120 |
#st.success(mess)
|
| 121 |
summary_result = summarize(text)
|
| 122 |
st.success(summary_result)
|
| 123 |
-
|
| 124 |
#st.title("Summarize Your Text for English only!")
|
| 125 |
tokenizer = AutoTokenizer.from_pretrained('t5-base')
|
| 126 |
model = AutoModelWithLMHead.from_pretrained('t5-base', return_dict=True)
|
|
|
|
| 96 |
#our_image=load_image("image.jpg")
|
| 97 |
#img = cv2.imread("scholarly_text.jpg")
|
| 98 |
text = message
|
| 99 |
+
if st.checkbox("Show Named Entities English/Bangla"):
|
| 100 |
entity_result = entity_analyzer(text)
|
| 101 |
st.json(entity_result)
|
| 102 |
+
if st.checkbox("Show Sentiment Analysis for English"):
|
| 103 |
blob = TextBlob(text)
|
| 104 |
result_sentiment = blob.sentiment
|
| 105 |
st.success(result_sentiment)
|
| 106 |
+
if st.checkbox("Spell Corrections for English"):
|
| 107 |
st.success(TextBlob(text).correct())
|
| 108 |
if st.checkbox("Text Generation"):
|
| 109 |
ok = st.button("Generate")
|
|
|
|
| 120 |
#st.success(mess)
|
| 121 |
summary_result = summarize(text)
|
| 122 |
st.success(summary_result)
|
| 123 |
+
if st.checkbox("Mark here, Better Text Summarization for English only!"):
|
| 124 |
#st.title("Summarize Your Text for English only!")
|
| 125 |
tokenizer = AutoTokenizer.from_pretrained('t5-base')
|
| 126 |
model = AutoModelWithLMHead.from_pretrained('t5-base', return_dict=True)
|