Unverified Commit b5169527 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Add TFAutoModelForImageClassification to pipelines.py (#18292)


Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent f374d391
...@@ -81,6 +81,7 @@ if is_tf_available(): ...@@ -81,6 +81,7 @@ if is_tf_available():
TF_MODEL_WITH_LM_HEAD_MAPPING, TF_MODEL_WITH_LM_HEAD_MAPPING,
TFAutoModel, TFAutoModel,
TFAutoModelForCausalLM, TFAutoModelForCausalLM,
TFAutoModelForImageClassification,
TFAutoModelForMaskedLM, TFAutoModelForMaskedLM,
TFAutoModelForQuestionAnswering, TFAutoModelForQuestionAnswering,
TFAutoModelForSeq2SeqLM, TFAutoModelForSeq2SeqLM,
...@@ -282,7 +283,7 @@ SUPPORTED_TASKS = { ...@@ -282,7 +283,7 @@ SUPPORTED_TASKS = {
}, },
"image-classification": { "image-classification": {
"impl": ImageClassificationPipeline, "impl": ImageClassificationPipeline,
"tf": (), "tf": (TFAutoModelForImageClassification,) if is_tf_available() else (),
"pt": (AutoModelForImageClassification,) if is_torch_available() else (), "pt": (AutoModelForImageClassification,) if is_torch_available() else (),
"default": {"model": {"pt": ("google/vit-base-patch16-224", "5dca96d")}}, "default": {"model": {"pt": ("google/vit-base-patch16-224", "5dca96d")}},
"type": "image", "type": "image",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment