Spaces:
Sleeping
Sleeping
Update tasks/text.py
Browse files- tasks/text.py +2 -2
tasks/text.py
CHANGED
@@ -59,8 +59,8 @@ async def evaluate_text(request: TextEvaluationRequest):
|
|
59 |
# Make random predictions (placeholder for actual model inference)
|
60 |
true_labels = test_dataset["label"]
|
61 |
config = AutoConfig.from_pretrained("camillebrl/ModernBERT-envclaims-overfit")
|
62 |
-
|
63 |
-
|
64 |
"text-classification",
|
65 |
"camillebrl/ModernBERT-envclaims-overfit",
|
66 |
device="cpu"
|
|
|
59 |
# Make random predictions (placeholder for actual model inference)
|
60 |
true_labels = test_dataset["label"]
|
61 |
config = AutoConfig.from_pretrained("camillebrl/ModernBERT-envclaims-overfit")
|
62 |
+
label2id = config.label2id
|
63 |
+
classifier = pipeline(
|
64 |
"text-classification",
|
65 |
"camillebrl/ModernBERT-envclaims-overfit",
|
66 |
device="cpu"
|