SuchithTissera commited on
Commit
8a50e53
·
verified ·
1 Parent(s): fdb24f6

Update pages/1_Classification.py

Browse files
Files changed (1) hide show
  1. pages/1_Classification.py +9 -0
pages/1_Classification.py CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  st.title("News Classifier + Q&A")
2
  st.write(
3
  "Upload a CSV file with a `content` column. The app will classify each record, "
 
1
+ @st.cache_resource
2
+ def load_classifier():
3
+ return pipeline(
4
+ "text-classification",
5
+ model="SuchithTissera/text_analytics_model",
6
+ truncation=True
7
+ )
8
+
9
+ classifier = load_classifier()
10
  st.title("News Classifier + Q&A")
11
  st.write(
12
  "Upload a CSV file with a `content` column. The app will classify each record, "