Lauraayu commited on
Commit
0bf263e
1 Parent(s): 12208cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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/News_Classi_Model")
11
- model_bb = AutoModelForSequenceClassification.from_pretrained("Lauraayu/News_Classi_Model")
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