Spaces:
Sleeping
Sleeping
Update tasks/text.py
Browse files- tasks/text.py +6 -1
tasks/text.py
CHANGED
@@ -65,7 +65,12 @@ async def evaluate_text(request: TextEvaluationRequest):
|
|
65 |
|
66 |
# Model and Tokenizer
|
67 |
model_name = "Zen0/FrugalDisinfoHunter"
|
68 |
-
model = AutoModelForSequenceClassification.from_pretrained(
|
|
|
|
|
|
|
|
|
|
|
69 |
tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
|
70 |
|
71 |
# Tokenize the test data
|
|
|
65 |
|
66 |
# Model and Tokenizer
|
67 |
model_name = "Zen0/FrugalDisinfoHunter"
|
68 |
+
model = AutoModelForSequenceClassification.from_pretrained(
|
69 |
+
"Zen0/FrugalDisinfoHunter",
|
70 |
+
num_labels=8,
|
71 |
+
output_hidden_states=True, # Additional option
|
72 |
+
problem_type="single_label_classification" # Explicitly specify classification type
|
73 |
+
)
|
74 |
tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
|
75 |
|
76 |
# Tokenize the test data
|