Spaces:
Runtime error
Runtime error
Commit
·
2221ec2
1
Parent(s):
fadb965
Change app to sumarization
Browse files
app.py
CHANGED
@@ -1,4 +1,9 @@
|
|
1 |
import streamlit as st
|
2 |
-
from
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
summarizer = pipeline("summarization")
|
4 |
+
text = st.text_area('Text to analyze')
|
5 |
+
if st.button('Summarize'):
|
6 |
+
output = summarizer(text)
|
7 |
+
st.write("# Summary")
|
8 |
+
st.write(output)
|
9 |
+
|