Spaces:
Runtime error
Runtime error
File size: 311 Bytes
e08ba6b | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import os
import tensorflow as tf
import logging
# Disable oneDNN custom operations if needed
os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0'
# Disable GPU usage (force TensorFlow to use CPU)
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
# Suppress TensorFlow warnings and logs
tf.get_logger().setLevel(logging.ERROR)
|