File size: 349 Bytes
78e5ec4
 
 
 
 
 
 
19ee232
 
 
ebdb7aa
1
2
3
4
5
6
7
8
9
10
11

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'])