Skip to content

Commit

Permalink
ovewrite top_k when crate audio classification pipeline (#35541)
Browse files Browse the repository at this point in the history
* ovewrite top_k when crate audio classification pipeline

* Update src/transformers/pipelines/audio_classification.py

---------

Co-authored-by: Matt <[email protected]>
  • Loading branch information
HERIUN and Rocketknight1 authored Jan 8, 2025
1 parent 8c555ca commit 854dc79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/pipelines/audio_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class AudioClassificationPipeline(Pipeline):

def __init__(self, *args, **kwargs):
# Default, might be overriden by the model.config.
kwargs["top_k"] = 5
kwargs["top_k"] = kwargs.get("top_k", 5)
super().__init__(*args, **kwargs)

if self.framework != "pt":
Expand Down

0 comments on commit 854dc79

Please sign in to comment.