Instructions to use wladislax/tensorflow-savedmodel-modelscan-bypass with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TF-Keras
How to use wladislax/tensorflow-savedmodel-modelscan-bypass with TF-Keras:
# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy) # See https://github.com/keras-team/tf-keras for more details. from huggingface_hub import from_pretrained_keras model = from_pretrained_keras("wladislax/tensorflow-savedmodel-modelscan-bypass") - Notebooks
- Google Colab
- Kaggle
| """Load a SavedModel and run inference (the standard victim action).""" | |
| import os | |
| os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" | |
| import sys | |
| import tensorflow as tf | |
| d = sys.argv[1] | |
| m = tf.saved_model.load(d) | |
| out = m(tf.constant([1.0, 2.0, 3.0], dtype=tf.float32)) | |
| print("INFERENCE_OK output=", out.numpy().tolist()) | |