Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
-
from datasets import load_dataset
|
4 |
|
5 |
-
ds = load_dataset("abisee/cnn_dailymail", "3.0.0")
|
6 |
t5_sum = pipeline("summarization", model= "t5-small")
|
7 |
|
8 |
# Set the title for the Streamlit app
|
@@ -11,7 +9,7 @@ st.title("T5 Summary Generator")
|
|
11 |
# Text input for the user
|
12 |
text = st.text_area("Enter your text: ")
|
13 |
|
14 |
-
def
|
15 |
article = dataset_sample
|
16 |
summary = summarizer(article, max_length=150, min_length=40, do_sample=False)
|
17 |
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
|
|
3 |
|
|
|
4 |
t5_sum = pipeline("summarization", model= "t5-small")
|
5 |
|
6 |
# Set the title for the Streamlit app
|
|
|
9 |
# Text input for the user
|
10 |
text = st.text_area("Enter your text: ")
|
11 |
|
12 |
+
def generate_text(dataset_sample):
|
13 |
article = dataset_sample
|
14 |
summary = summarizer(article, max_length=150, min_length=40, do_sample=False)
|
15 |
|