Spaces:
Sleeping
Sleeping
Commit
·
02b3187
1
Parent(s):
b0a7177
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
st.title("TLDR-izer")
|
5 |
+
article = st.text_area('Text to be summarized:', height=200)
|
6 |
+
|
7 |
+
if st.button("Do the Magic!"):
|
8 |
+
summarizer = pipeline("summarization")
|
9 |
+
output= summarizer(article, min_length = 200 , max_length=250)
|
10 |
+
st.write(output[0]['summary_text'])
|
11 |
+
|