Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ st.title("News Article Summarizer and Classifier")
|
|
14 |
st.write("Enter a news article text to get its summary and category.")
|
15 |
|
16 |
# Text input for user to enter the news article text
|
17 |
-
|
18 |
|
19 |
def summarize(text, max_length=150):
|
20 |
input_ids = tokenizer.encode(text, return_tensors="pt", add_special_tokens=True)
|
@@ -44,3 +44,4 @@ if st.button("Classify"):
|
|
44 |
# Display the summary and classification result
|
45 |
st.write("Summary:", summary)
|
46 |
st.write("Category:", predicted_label)
|
|
|
|
14 |
st.write("Enter a news article text to get its summary and category.")
|
15 |
|
16 |
# Text input for user to enter the news article text
|
17 |
+
article = st.text_area("News Article", height=300)
|
18 |
|
19 |
def summarize(text, max_length=150):
|
20 |
input_ids = tokenizer.encode(text, return_tensors="pt", add_special_tokens=True)
|
|
|
44 |
# Display the summary and classification result
|
45 |
st.write("Summary:", summary)
|
46 |
st.write("Category:", predicted_label)
|
47 |
+
|