nicoladisabato commited on
Commit
8719562
Β·
1 Parent(s): 44be66b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
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)