[Docs] Add language identifiers to fenced code blocks (#28955)
Add language identifiers to code blocks
This commit is contained in:
@@ -41,7 +41,7 @@ You can run FastSpeech2Conformer locally with the 🤗 Transformers library.
|
||||
|
||||
1. First install the 🤗 [Transformers library](https://github.com/huggingface/transformers), g2p-en:
|
||||
|
||||
```
|
||||
```bash
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade transformers g2p-en
|
||||
```
|
||||
|
||||
@@ -50,7 +50,7 @@ this https URL.*
|
||||
|
||||
LayoutLMv2 depends on `detectron2`, `torchvision` and `tesseract`. Run the
|
||||
following to install them:
|
||||
```
|
||||
```bash
|
||||
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
|
||||
python -m pip install torchvision tesseract
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ The original code can be found [here](https://github.com/jpwang/lilt).
|
||||
- To combine the Language-Independent Layout Transformer with a new RoBERTa checkpoint from the [hub](https://huggingface.co/models?search=roberta), refer to [this guide](https://github.com/jpWang/LiLT#or-generate-your-own-checkpoint-optional).
|
||||
The script will result in `config.json` and `pytorch_model.bin` files being stored locally. After doing this, one can do the following (assuming you're logged in with your HuggingFace account):
|
||||
|
||||
```
|
||||
```python
|
||||
from transformers import LiltModel
|
||||
|
||||
model = LiltModel.from_pretrained("path_to_your_files")
|
||||
|
||||
@@ -136,7 +136,7 @@ The same [`MusicgenProcessor`] can be used to pre-process an audio prompt that i
|
||||
following example, we load an audio file using the 🤗 Datasets library, which can be pip installed through the command
|
||||
below:
|
||||
|
||||
```
|
||||
```bash
|
||||
pip install --upgrade pip
|
||||
pip install datasets[audio]
|
||||
```
|
||||
|
||||
@@ -54,7 +54,7 @@ The original code can be found [here](https://github.com/sweetcocoa/pop2piano).
|
||||
## Usage tips
|
||||
|
||||
* To use Pop2Piano, you will need to install the 🤗 Transformers library, as well as the following third party modules:
|
||||
```
|
||||
```bash
|
||||
pip install pretty-midi==0.2.9 essentia==2.1b6.dev1034 librosa scipy
|
||||
```
|
||||
Please note that you may need to restart your runtime after installation.
|
||||
|
||||
Reference in New Issue
Block a user