Skip to content

Commit 05e89b6

Browse files
Fix linting complaints.
1 parent 43a917c commit 05e89b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

validator/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(
4646
# There are some spurious loading complaints with TFDistilBert models.
4747
# See https://discuss.huggingface.co/t/message-some-layers-from-the-model-were-not-used/1972/7
4848

49-
def validate(self, value: Any, metadata: Dict = None) -> ValidationResult:
49+
def validate(self, value: Any, metadata: Optional[Dict] = None) -> ValidationResult:
5050
"""Validates that the text is free from biases related to age, gender, sex, ethnicity, religion, etc."""
5151
if isinstance(value, str):
5252
value = [value,] # Ensure we're always passing lists of strings into the classifier.

validator/post-install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
print("post-install starting...")
21
from transformers import pipeline
2+
print("post-install starting...")
33
_ = pipeline("text-classification", "d4data/bias-detection-model")
44
print("post-install complete!")

0 commit comments

Comments
 (0)