Cannot import name 'WhisperForAudioClassification

I am trying to use Whisper Model for Audio classification.
But I couldn’t import WhisperForAudioClassification.

ImportError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from transformers import AutoConfig, WhisperForAudioClassification
2 config = AutoConfig.from_pretrained(“openai/whisper-base”)

ImportError: cannot import name ‘WhisperForAudioClassification’ from ‘transformers’ (/usr/local/lib/python3.10/dist-packages/transformers/

NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

!transformers-cli env

  • transformers version: 4.40.2
  • Platform: Linux-6.1.85±x86_64-with-glibc2.35
  • Python version: 3.10.12
  • Huggingface_hub version: 0.23.0
  • Safetensors version: 0.4.3
  • Accelerate version: 0.30.1
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.2.1+cu121 (True)
  • Tensorflow version (GPU?): 2.15.0 (True)
  • Flax version (CPU?/GPU?/TPU?): 0.8.3 (gpu)
  • Jax version: 0.4.26
  • JaxLib version: 0.4.26
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

I am new to this discussion forum.