Spaces:
Runtime error
Runtime error
Commit
Β·
8719562
1
Parent(s):
44be66b
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,21 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
st.set_page_config(page_title='Chat Summarization WebApp')
|
5 |
-
st.title('Chat Summarization WebApp')
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
pipe = pipeline("summarization", model="nicoladisabato/pegasus-samsum")
|
8 |
-
text = st.text_area("Enter your chat", '', height=200)
|
9 |
|
10 |
if st.button('Summarize'):
|
11 |
out = pipe(text)
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
st.set_page_config(page_title='ππ Chat Summarization WebApp')
|
5 |
+
st.title('ππ Chat Summarization WebApp')
|
6 |
|
7 |
+
predefined_text = """
|
8 |
+
Nico: the moon is very beautiful tonight.
|
9 |
+
Demo: I agree with you.
|
10 |
+
Nico: My dream is to go to the moon one day.
|
11 |
+
Demo: Are you serious? I'm scared about the space.
|
12 |
+
Nico: So won't you come?
|
13 |
+
Demo: I prefer to go to Lido Le Canne in Pulsano.
|
14 |
+
Nico: Ahahah
|
15 |
+
"""
|
16 |
+
|
17 |
+
text = st.text_area("Enter your chat", value=predefined_text, height=200)
|
18 |
pipe = pipeline("summarization", model="nicoladisabato/pegasus-samsum")
|
|
|
19 |
|
20 |
if st.button('Summarize'):
|
21 |
out = pipe(text)
|