Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,8 @@ tokenizer_bb = AutoTokenizer.from_pretrained("Lauraayu/News_Classi_Model")
|
|
10 |
model_bb = AutoModelForSequenceClassification.from_pretrained("Lauraayu/News_Classi_Model")
|
11 |
|
12 |
# Streamlit application title
|
13 |
-
st.title("News Article
|
14 |
-
st.write("Enter a news article text to get its
|
15 |
|
16 |
# Text input for user to enter the news article text
|
17 |
article = st.text_area("News Article", height=300)
|
@@ -41,7 +41,6 @@ if st.button("Classify"):
|
|
41 |
label_mapping = model_bb.config.id2label
|
42 |
predicted_label = label_mapping[predicted_label_id]
|
43 |
|
44 |
-
# Display the
|
45 |
-
st.write("Summary:", summary)
|
46 |
st.write("Category:", predicted_label)
|
47 |
|
|
|
10 |
model_bb = AutoModelForSequenceClassification.from_pretrained("Lauraayu/News_Classi_Model")
|
11 |
|
12 |
# Streamlit application title
|
13 |
+
st.title("News Article Classifier")
|
14 |
+
st.write("Enter a news article text to get its category.")
|
15 |
|
16 |
# Text input for user to enter the news article text
|
17 |
article = st.text_area("News Article", height=300)
|
|
|
41 |
label_mapping = model_bb.config.id2label
|
42 |
predicted_label = label_mapping[predicted_label_id]
|
43 |
|
44 |
+
# Display the classification result
|
|
|
45 |
st.write("Category:", predicted_label)
|
46 |
|