Soumen commited on
Commit
4387995
1 Parent(s): 0c046dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
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
- ok = st.button("Generate")
178
- if ok:
179
- tokenizer, model = load_models()
180
- input_ids = tokenizer(text, return_tensors='pt').input_ids
181
- st.text("Using Hugging Face Transformer, Contrastive Search ..")
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
- st.subheader("Summarize Your Text for English and Bangla Texts!")
186
- message = st.text_area("Enter the Text","Type please ..")
187
- st.text("Using Gensim Summarizer ..")
188
- st.success(mess)
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!"):