'AttributeError: module 'tensorflow' has no attribute 'gfile' Tensorflow 2.8.2

can someone please help me with this error....I tried using tf.io.gfile instead of tf.gfile then to its not working

error shown is still the same

AttributeError: module 'tensorflow' has no attribute 'gfile'



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source