Spaces:
Runtime error
Runtime error
File size: 731 Bytes
a381abb c01c953 a381abb c01c953 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import streamlit as st
from transformers import pipeline
pipeline = pipeline(task="summarization", model="lidiya/bart-large-xsum-samsum")
st.title("Résumé de conversation avec BART")
txt = """Hannah: Hey, do you have Betty's number?
Amanda: Lemme check
Amanda: Sorry, can't find it.
Amanda: Ask Larry
Amanda: He called her last time we were at the park together
Hannah: I don't know him well
Amanda: Don't be shy, he's very nice
Hannah: If you say so..
Hannah: I'd rather you texted him
Amanda: Just text him 🙂
Hannah: Urgh.. Alright
Hannah: Bye
Amanda: Bye bye
"""
col1, col2 = st.columns(2)
summary = pipeline(txt)
col1.header("Texte original")
col1.subheader(txt)
col2.header("Texte résumé")
col2.subheader(summary)
|