Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,22 +2,15 @@ import streamlit as st
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
# Load the summarization pipeline from Hugging Face
|
5 |
-
summarizer = pipeline("summarization", model="
|
6 |
|
7 |
# Streamlit interface
|
8 |
st.title("Text Summarization App")
|
9 |
|
10 |
-
#
|
11 |
-
|
12 |
|
13 |
-
if
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
summarized_text = summary[0]['summary_text']
|
18 |
-
|
19 |
-
# Display the summary
|
20 |
-
st.subheader("Summary")
|
21 |
-
st.write(summarized_text)
|
22 |
-
else:
|
23 |
-
st.error("Please enter some text to summarize.")
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
# Load the summarization pipeline from Hugging Face
|
5 |
+
summarizer = pipeline("summarization", model="Suhaib-27/check")
|
6 |
|
7 |
# Streamlit interface
|
8 |
st.title("Text Summarization App")
|
9 |
|
10 |
+
# get the topic
|
11 |
+
text = st.text_area("Enter your desired Topic of Blog")
|
12 |
|
13 |
+
if text:
|
14 |
+
summarizer(text)
|
15 |
+
|
16 |
+
st.write(zero_output)
|
|
|
|
|
|
|
|
|
|
|
|
|
|