Spaces:
Runtime error
Runtime error
File size: 429 Bytes
75bdb14 8dbc72e 40e99d2 8dbc72e |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import streamlit as st
from transformers import pipeline
pipe = pipeline("text2text-generation", model="bastiango97/resumen_articulos_CNN")
text = st.text_area('Enter the article and I will summirize it for you:')
if text:
# Use the first element of the list and directly access the 'generated_text' key
generated_text = pipe(text)[0].get('generated_text')
# Display the generated text
st.text(generated_text) |