Doc styler examples (#14953)
* Fix bad examples * Add black formatting to style_doc * Use first nonempty line * Put it at the right place * Don't add spaces to empty lines * Better templates * Deal with triple quotes in docstrings * Result of style_doc * Enable mdx treatment and fix code examples in MDXs * Result of doc styler on doc source files * Last fixes * Break copy from
This commit is contained in:
@@ -34,7 +34,7 @@ One can directly plug in the weights of LayoutXLM into a LayoutLMv2 model, like
|
||||
```python
|
||||
from transformers import LayoutLMv2Model
|
||||
|
||||
model = LayoutLMv2Model.from_pretrained('microsoft/layoutxlm-base')
|
||||
model = LayoutLMv2Model.from_pretrained("microsoft/layoutxlm-base")
|
||||
```
|
||||
|
||||
Note that LayoutXLM has its own tokenizer, based on
|
||||
@@ -44,7 +44,7 @@ follows:
|
||||
```python
|
||||
from transformers import LayoutXLMTokenizer
|
||||
|
||||
tokenizer = LayoutXLMTokenizer.from_pretrained('microsoft/layoutxlm-base')
|
||||
tokenizer = LayoutXLMTokenizer.from_pretrained("microsoft/layoutxlm-base")
|
||||
```
|
||||
|
||||
Similar to LayoutLMv2, you can use [`LayoutXLMProcessor`] (which internally applies
|
||||
|
||||
Reference in New Issue
Block a user