Spaces:
Sleeping
Sleeping
Leo Liu
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,13 @@ pipe = pipeline("summarization", model="facebook/bart-large-cnn")
|
|
7 |
# Application
|
8 |
st.title("Make a summarization!")
|
9 |
|
10 |
-
user_input = st.text_input("")
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Application
|
8 |
st.title("Make a summarization!")
|
9 |
|
10 |
+
user_input = st.text_input("Enter text to summarize:")
|
11 |
+
|
12 |
+
if st.button("Summarize Me!"):
|
13 |
+
if user_input:
|
14 |
+
with st.spinner('Summarizing...'):
|
15 |
+
result = pipe(user_input)
|
16 |
+
summarization = result[0]['summary_text']
|
17 |
+
st.write(f"Summary: {summarization}")
|
18 |
+
else:
|
19 |
+
st.warning("Please enter some text to summarize!")
|