Spaces:
Sleeping
Sleeping
Leo Liu
commited on
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
# Load pipelines
|
5 |
+
pipe = pipeline("summarization", model="facebook/bart-large-cnn")
|
6 |
+
|
7 |
+
# Application
|
8 |
+
st.title("Make a summarization!")
|
9 |
+
|
10 |
+
user_input = st.text_input("")
|
11 |
+
if user_input:
|
12 |
+
result = pipe(user_input)
|
13 |
+
summarization = result[0]
|
14 |
+
st.write(f"Sentiment: {summarization}")
|