Skip to content

Commit

Permalink
add tf to docs / init
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchit-gandhi committed Jun 16, 2023
1 parent d39a036 commit 8b003f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2999,6 +2999,7 @@
"TFAutoModelForSequenceClassification",
"TFAutoModelForSpeechSeq2Seq",
"TFAutoModelForTableQuestionAnswering",
"TFAutoModelForTextEncoding",
"TFAutoModelForTokenClassification",
"TFAutoModelForVision2Seq",
"TFAutoModelForZeroShotImageClassification",
Expand Down Expand Up @@ -6385,6 +6386,7 @@
TFAutoModelForSequenceClassification,
TFAutoModelForSpeechSeq2Seq,
TFAutoModelForTableQuestionAnswering,
TFAutoModelForTextEncoding,
TFAutoModelForTokenClassification,
TFAutoModelForVision2Seq,
TFAutoModelForZeroShotImageClassification,
Expand Down
7 changes: 7 additions & 0 deletions src/transformers/utils/dummy_tf_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,13 @@ def __init__(self, *args, **kwargs):
requires_backends(self, ["tf"])


class TFAutoModelForTextEncoding(metaclass=DummyObject):
_backends = ["tf"]

def __init__(self, *args, **kwargs):
requires_backends(self, ["tf"])


class TFAutoModelForTokenClassification(metaclass=DummyObject):
_backends = ["tf"]

Expand Down

0 comments on commit 8b003f7

Please sign in to comment.