Spaces:
Sleeping
Sleeping
Update pages/1_Classification.py
Browse files
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, "
|