Update app.py
Browse files
app.py
CHANGED
|
@@ -174,18 +174,16 @@ def main():
|
|
| 174 |
if st.checkbox("Spell Corrections for English"):
|
| 175 |
st.success(TextBlob(text).correct())
|
| 176 |
if st.checkbox("Text Generation"):
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
output = model.generate(input_ids, max_length=128)
|
| 183 |
-
st.success(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 184 |
if st.checkbox("Mark here, Text Summarization for English or Bangla!"):
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
summary_result = summarize(text)
|
| 190 |
st.success(summary_result)
|
| 191 |
if st.checkbox("Mark to better English Text Summarization!"):
|
|
|
|
| 174 |
if st.checkbox("Spell Corrections for English"):
|
| 175 |
st.success(TextBlob(text).correct())
|
| 176 |
if st.checkbox("Text Generation"):
|
| 177 |
+
tokenizer, model = load_models()
|
| 178 |
+
input_ids = tokenizer(text, return_tensors='pt').input_ids
|
| 179 |
+
st.text("Using Hugging Face Transformer, Contrastive Search ..")
|
| 180 |
+
output = model.generate(input_ids, max_length=128)
|
| 181 |
+
st.success(tokenizer.decode(output[0], skip_special_tokens=True))
|
|
|
|
|
|
|
| 182 |
if st.checkbox("Mark here, Text Summarization for English or Bangla!"):
|
| 183 |
+
st.subheader("Summarize Your Text for English and Bangla Texts!")
|
| 184 |
+
message = st.text_area("Enter the Text","Type please ..")
|
| 185 |
+
st.text("Using Gensim Summarizer ..")
|
| 186 |
+
st.success(mess)
|
| 187 |
summary_result = summarize(text)
|
| 188 |
st.success(summary_result)
|
| 189 |
if st.checkbox("Mark to better English Text Summarization!"):
|