Update README.md
Browse files
README.md
CHANGED
|
@@ -60,11 +60,10 @@ Minimal example:
|
|
| 60 |
|
| 61 |
```python
|
| 62 |
# Load model
|
| 63 |
-
architecture = "openai/whisper-small"
|
| 64 |
checkpoint = "MU-NLPC/whisper-small-audio-captioning"
|
| 65 |
-
model =
|
| 66 |
tokenizer = transformers.WhisperTokenizer.from_pretrained(checkpoint, language="en", task="transcribe")
|
| 67 |
-
feature_extractor = transformers.WhisperFeatureExtractor.from_pretrained(
|
| 68 |
|
| 69 |
# Load and preprocess audio
|
| 70 |
input_file = "..."
|
|
|
|
| 60 |
|
| 61 |
```python
|
| 62 |
# Load model
|
|
|
|
| 63 |
checkpoint = "MU-NLPC/whisper-small-audio-captioning"
|
| 64 |
+
model = WhisperForAudioCaptioning.from_pretrained(checkpoint)
|
| 65 |
tokenizer = transformers.WhisperTokenizer.from_pretrained(checkpoint, language="en", task="transcribe")
|
| 66 |
+
feature_extractor = transformers.WhisperFeatureExtractor.from_pretrained(checkpoint)
|
| 67 |
|
| 68 |
# Load and preprocess audio
|
| 69 |
input_file = "..."
|