Text Classification
Transformers
Safetensors
PyTorch
English
bert
news-classification
BERT
Eval Results (legacy)
Instructions to use CIS519PG/News_Classifier_Demo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CIS519PG/News_Classifier_Demo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CIS519PG/News_Classifier_Demo")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("CIS519PG/News_Classifier_Demo") model = AutoModelForSequenceClassification.from_pretrained("CIS519PG/News_Classifier_Demo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update eval_pipeline.py
Browse filesChange News Outlet to outlet
- eval_pipeline.py +1 -1
eval_pipeline.py
CHANGED
|
@@ -24,7 +24,7 @@ def preprocess_data(df):
|
|
| 24 |
try:
|
| 25 |
processed_data = []
|
| 26 |
for _, row in df.iterrows():
|
| 27 |
-
outlet = row["
|
| 28 |
if outlet == "FOX NEWS":
|
| 29 |
outlet = "FOXNEWS"
|
| 30 |
elif outlet == "NBC NEWS":
|
|
|
|
| 24 |
try:
|
| 25 |
processed_data = []
|
| 26 |
for _, row in df.iterrows():
|
| 27 |
+
outlet = row["outlet"].strip().upper()
|
| 28 |
if outlet == "FOX NEWS":
|
| 29 |
outlet = "FOXNEWS"
|
| 30 |
elif outlet == "NBC NEWS":
|