Spaces:
Sleeping
Sleeping
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']) |