Nikhitha2310's picture
Update app.py
ebdb7aa verified
raw
history blame contribute delete
349 Bytes
import streamlit as st
import transformers
from transformers import pipeline ,T5Tokenizer, T5ForConditionalGeneration
pipe=pipeline(task='summarization',model='PamelaBorelli/flan-t5-base-summarization-pt-br')
text=st.text_input("Enter a text")
btn=st.button("Submit")
if(text and btn):
output=pipe(text)
st.write(output[0]['summary_text'])