Suhaib-27 commited on
Commit
b1ddd97
1 Parent(s): 6e5c5c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -14
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="sshleifer/distilbart-cnn-12-6")
6
 
7
  # Streamlit interface
8
  st.title("Text Summarization App")
9
 
10
- # Text input
11
- input_text = st.text_area("Enter the text to summarize:", height=200)
12
 
13
- if st.button("Summarize"):
14
- if input_text:
15
- # Summarize the text
16
- summary = summarizer(input_text, max_length=50, min_length=25, do_sample=False)
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)