Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import name 'WhisperForAudioClassification -Already installed transformers==4.40.2 #30834

Open
manjualoshious opened this issue May 15, 2024 · 4 comments
Assignees
Labels

Comments

@manjualoshious
Copy link

ImportError: cannot import name 'WhisperForAudioClassification' from 'transformers' (/usr/local/lib/python3.10/dist-packages/transformers/init.py)

from transformers import WhisperForAudioClassification

I have installed transformers==4.40.2

Issue still exists.

@amyeroberts
Copy link
Collaborator

cc @sanchit-gandhi

@manjualoshious
Copy link
Author

manjualoshious commented May 15, 2024 via email

@amyeroberts
Copy link
Collaborator

Hi @manjualoshious, please be patient refrain sending many comments on an issue and spamming people with notifications. We receive many pull requests and issues per day and they will be addressed in due time. Leaving a comment that something hasn't been addressed within an hour is not sustainable behaviour: we would be unable to meaningfully address any issues if everyone did this.

The best way to get a quick response is to follow the issue template and provide all of the information provided, which I've already asked for you to do in another issue. A quick response is on the order of hours / days.

@sanchit-gandhi
Copy link
Contributor

Hey @manjualoshious - could you please provide the full traceback you're getting why you try this? It would also be great to see the output of transformers-cli env, so we can cross-check you have the appropriate packages installed. For reference, mine is:

- `transformers` version: 4.41.0.dev0
- Platform: macOS-14.4.1-arm64-arm-64bit
- Python version: 3.11.6
- Huggingface_hub version: 0.23.0
- Safetensors version: 0.4.2
- Accelerate version: 0.27.2
- Accelerate config: 	not found
- PyTorch version (GPU?): 2.2.0 (False)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): 0.8.1 (cpu)
- Jax version: 0.4.24
- JaxLib version: 0.4.24

And I am successfully able to import the class:

from transformers import WhisperForAudioClassification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants