in src/sagemaker_huggingface_inference_toolkit/transformers_utils.py [0:0]
def _get_framework():
"""
extracts which DL framework is used for inference, if both are installed use pytorch
"""
if is_torch_available():
return "pytorch"
elif is_tf_available():
return "tensorflow"
else:
raise RuntimeError(
"At least one of TensorFlow 2.0 or PyTorch should be installed. "
"To install TensorFlow 2.0, read the instructions at https://www.tensorflow.org/install/ "
"To install PyTorch, read the instructions at https://pytorch.org/."
)