Spaces:
Runtime error
Runtime error
Commit
·
a3ccb8a
1
Parent(s):
64e9d5d
update
Browse files
bias_detector/__pycache__/bias_detector.cpython-311.pyc
CHANGED
Binary files a/bias_detector/__pycache__/bias_detector.cpython-311.pyc and b/bias_detector/__pycache__/bias_detector.cpython-311.pyc differ
|
|
bias_detector/bias_detector.py
CHANGED
@@ -47,10 +47,10 @@ class Detector:
|
|
47 |
# Using pipeline for inference
|
48 |
if classifier == 'Token':
|
49 |
task_type = "ner"
|
50 |
-
self.model = pipeline(task_type, model=self.model_path, tokenizer=
|
51 |
else:
|
52 |
task_type = "text-classification"
|
53 |
-
self.model = pipeline(task_type, model=self.model_path, tokenizer=
|
54 |
|
55 |
|
56 |
def predict(self, texts: List[str]):
|
|
|
47 |
# Using pipeline for inference
|
48 |
if classifier == 'Token':
|
49 |
task_type = "ner"
|
50 |
+
self.model = pipeline(task_type, model=self.model_path, tokenizer=self.model_path,use_auth_token=API_token)
|
51 |
else:
|
52 |
task_type = "text-classification"
|
53 |
+
self.model = pipeline(task_type, model=self.model_path, tokenizer=self.model_path,use_auth_token=API_token,return_all_scores= True)
|
54 |
|
55 |
|
56 |
def predict(self, texts: List[str]):
|