Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,8 @@ import torch
|
|
7 |
tokenizer = AutoTokenizer.from_pretrained("mrm8488/t5-base-finetuned-summarize-news")
|
8 |
model = AutoModelWithLMHead.from_pretrained("mrm8488/t5-base-finetuned-summarize-news")
|
9 |
|
10 |
-
tokenizer_bb = AutoTokenizer.from_pretrained("Lauraayu/
|
11 |
-
model_bb = AutoModelForSequenceClassification.from_pretrained("Lauraayu/
|
12 |
|
13 |
# Streamlit application title
|
14 |
st.title("News Article Classifier")
|
@@ -43,5 +43,6 @@ if st.button("Classify"):
|
|
43 |
predicted_label = label_mapping[predicted_label_id]
|
44 |
|
45 |
# Display the classification result
|
|
|
46 |
st.write("Category:", predicted_label)
|
47 |
|
|
|
7 |
tokenizer = AutoTokenizer.from_pretrained("mrm8488/t5-base-finetuned-summarize-news")
|
8 |
model = AutoModelWithLMHead.from_pretrained("mrm8488/t5-base-finetuned-summarize-news")
|
9 |
|
10 |
+
tokenizer_bb = AutoTokenizer.from_pretrained("Lauraayu/News_Classification_Model")
|
11 |
+
model_bb = AutoModelForSequenceClassification.from_pretrained("Lauraayu/News_Classification_Model")
|
12 |
|
13 |
# Streamlit application title
|
14 |
st.title("News Article Classifier")
|
|
|
43 |
predicted_label = label_mapping[predicted_label_id]
|
44 |
|
45 |
# Display the classification result
|
46 |
+
st.write("Summary:", summary)
|
47 |
st.write("Category:", predicted_label)
|
48 |
|