id2label is list but we need dict to load models properly from tf.saved_model
id2label is list and is consistent throughout pytorch and transformers the config.json file created through TFmodel.save_pretrained keeps it as list as well, the code above expected the id2label to be a dict obj but was list instead causing errors in loading saved models in tensorflow.

# What does this PR do?

<!--
prevented properly loading models from tensorflow
-->

<!-- Remove if not applicable -->

Fixes # (issue)

# id2label AttributeError : 'list' object has no attribute 'items' when loading saved model in TF
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 @LysandreJik

 -->

Hi @Abhishek-krg, I'm sorry for the slow reply. There are a couple of issues here:

1. The PR has a trailing ), so the code is invalid. Can you fix that issue so we can run tests?
2. The attached code is missing. Can you show some sample code that's failing without this PR?<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.