bastiango97 commited on
Commit
8dbc72e
1 Parent(s): 3ff6bc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -6,5 +6,8 @@ pipe = pipeline("text2text-generation", model="bastiango97/resumen_articulos_CNN
6
  text = st.text_area('Enter the article and I will summirize it for you:')
7
 
8
  if text:
9
- out = pipe(text)
10
- st.text(out)
 
 
 
 
6
  text = st.text_area('Enter the article and I will summirize it for you:')
7
 
8
  if text:
9
+ # Use the first element of the list and directly access the 'generated_text' key
10
+ generated_text = pipe(text)[0].get('generated_text', '')
11
+
12
+ # Display the generated text
13
+ st.text(generated_text)