add support for file I/O
sometimes we need to process multiple prompts from a file and generate multiple sequences. also, writing results to a file would be less verbose and fast. 
# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1297?src=pr&el=h1) Report
> Merging [#1297](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1297?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/0d1dad6d5323cf627cb8d7ddd428856ab8475f6b?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master    #1297   +/-   ##
=======================================
  Coverage   80.77%   80.77%           
=======================================
  Files          57       57           
  Lines        8092     8092           
=======================================
  Hits         6536     6536           
  Misses       1556     1556
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1297?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/pytorch-transformers/pull/1297?src=pr&el=footer). Last update [0d1dad6...2a11412](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1297?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
<|||||>Hi @rajarsheem ! Thank you for your PR. With the example scripts, we are really reaching for **simple scripts that showcase how the library works** and how it interacts with different elements of the Pytorch codebase (ex: distributed learning, gradient clipping, ...).

Using a text file as input may be useful in some cases, however, I don't feel like it really gives a deeper understanding of the library, as it is just a different way to obtain a context string. I don't think it would be particularly worth it in terms of the added complexity/deeper understanding of the lib ratio.

Please don't let that discourage you from opening other PRs.