From 1bf82fc98c9e516771915a80c1b834b43453e1e4 Mon Sep 17 00:00:00 2001 From: yangtx2009 Date: Mon, 21 Jul 2025 14:03:20 +0200 Subject: [PATCH] load tf text classification model correctly in new transformers --- validator/main.py | 3 +++ validator/post-install.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/validator/main.py b/validator/main.py index 051238f..fd0382b 100644 --- a/validator/main.py +++ b/validator/main.py @@ -48,6 +48,9 @@ def __init__( 'text-classification', model="d4data/bias-detection-model", tokenizer="d4data/bias-detection-model", + framework="tf", + from_tf=True, + torch_dtype=None ) def validate( diff --git a/validator/post-install.py b/validator/post-install.py index 26ec5ef..c0817cd 100644 --- a/validator/post-install.py +++ b/validator/post-install.py @@ -4,5 +4,8 @@ 'text-classification', model="d4data/bias-detection-model", tokenizer="d4data/bias-detection-model", + framework="tf", + from_tf=True, + torch_dtype=None ) print("post-install complete!") \ No newline at end of file