Skip to content

Commit

Permalink
Merge pull request #87 from susnato/patch-5
Browse files Browse the repository at this point in the history
Fix broken links in Chapter 4
  • Loading branch information
MKhalusova authored Jul 10, 2023
2 parents c6b20d5 + 25f6549 commit a076263
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chapters/en/chapter4/classification_models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ models for audio classification.
Decoder-only models introduce unnecessary complexity to the task, since they assume that the outputs can also be a _sequence_
of predictions (rather than a single class label prediction), and so generate multiple outputs. Therefore, they have slower
inference speed and tend not to be used. Encoder-decoder models are largely omitted for the same reason. These architecture
choices are analogous to those in NLP, where encoder-only models such as [BERT]((https://huggingface.co/blog/bert-101))
choices are analogous to those in NLP, where encoder-only models such as [BERT](https://huggingface.co/blog/bert-101)
are favoured for sequence classification tasks, and decoder-only models such as GPT reserved for sequence generation tasks.

Now that we've recapped the standard transformer architecture for audio classification, let's jump into the different
Expand Down
4 changes: 2 additions & 2 deletions chapters/en/chapter4/demo.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Build a demo with Gradio

In this final section on audio classification, we'll build a [Gradio]((https://gradio.app)) demo to showcase the music
In this final section on audio classification, we'll build a [Gradio](https://gradio.app) demo to showcase the music
classification model that we just trained on the [GTZAN](https://huggingface.co/datasets/marsyas/gtzan) dataset. The first
thing to do is load up the fine-tuned checkpoint using the `pipeline()` class - this is very familiar now from the section
on [pre-trained models](../classification_models). You can change the `model_id` to the namespace of your fine-tuned model
on [pre-trained models](classification_models). You can change the `model_id` to the namespace of your fine-tuned model
on the Hugging Face Hub:

```python
Expand Down
2 changes: 1 addition & 1 deletion chapters/en/chapter4/fine-tuning.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ gtzan["train"][0]
}
```

As we saw in [Unit 1](chapter1/audio_data), the audio files are represented as 1-dimensional NumPy arrays,
As we saw in [Unit 1](../chapter1/audio_data), the audio files are represented as 1-dimensional NumPy arrays,
where the value of the array represents the amplitude at that timestep. For these songs, the sampling rate is 22,050 Hz,
meaning there are 22,050 amplitude values sampled per second. We'll have to keep this in mind when using a pretrained model
with a different sampling rate, converting the sampling rates ourselves to ensure they match. We can also see the genre
Expand Down

0 comments on commit a076263

Please sign in to comment.