Spaces:
Sleeping
Sleeping
Commit
·
3a21579
1
Parent(s):
8bff467
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
import streamlit as st
|
| 3 |
+
|
| 4 |
+
st.header('Text Summarizer')
|
| 5 |
+
|
| 6 |
+
model = pipeline('summarization')
|
| 7 |
+
title = st.text_input('Enter the text to summarize')
|
| 8 |
+
if title:
|
| 9 |
+
st.write(model(title, max_length=220, min_length=30, do_sample=False))
|