Update pipeline examples to doctest syntax
Also fix the values to what's returned. This way we can run
```
python -m doctest README.md
```
to test this codes produces the exact same results. Not sure if we want to include this in our CI in some way.

# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/5030?src=pr&el=h1) Report
> Merging [#5030](https://codecov.io/gh/huggingface/transformers/pull/5030?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/bbad4c6989d489097f42bbe38001a3f8ca1c5c11&el=desc) will **decrease** coverage by `0.07%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/5030/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/5030?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #5030      +/-   ##
==========================================
- Coverage   77.19%   77.12%   -0.08%     
==========================================
  Files         128      128              
  Lines       21877    21877              
==========================================
- Hits        16888    16872      -16     
- Misses       4989     5005      +16     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/5030?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/5030/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ194bG5ldC5weQ==) | `76.35% <0.00%> (-2.30%)` | :arrow_down: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5030/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `73.38% <0.00%> (-0.41%)` | :arrow_down: |
| [src/transformers/trainer.py](https://codecov.io/gh/huggingface/transformers/pull/5030/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyLnB5) | `39.34% <0.00%> (-0.24%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/5030?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/5030?src=pr&el=footer). Last update [bbad4c6...db3cb29](https://codecov.io/gh/huggingface/transformers/pull/5030?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
<|||||>I didn't know this feature, this is pretty cool