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():
TF_MODEL_WITH_LM_HEAD_MAPPING,
TFAutoModel,
TFAutoModelForCausalLM,
TFAutoModelForImageClassification,
TFAutoModelForMaskedLM,
TFAutoModelForQuestionAnswering,
TFAutoModelForSeq2SeqLM,
......@@ -282,7 +283,7 @@ SUPPORTED_TASKS = {
},
"image-classification": {
"impl": ImageClassificationPipeline,
"tf": (),
"tf": (TFAutoModelForImageClassification,) if is_tf_available() else (),
"pt": (AutoModelForImageClassification,) if is_torch_available() else (),
"default": {"model": {"pt": ("google/vit-base-patch16-224", "5dca96d")}},
"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