Instructions to use OneScience-Group/Antibody_deep_learning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TF-Keras
How to use OneScience-Group/Antibody_deep_learning 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("OneScience-Group/Antibody_deep_learning") - Notebooks
- Google Colab
- Kaggle
File size: 382 Bytes
fe8e241 | 1 2 3 4 5 6 7 8 9 10 11 12 | import numpy as np
import tensorflow as tf
def predict_saved_model(model_dir, input_name, x):
model = tf.saved_model.load(model_dir)
serving = model.signatures["serving_default"]
x = np.asarray(x, dtype=np.float32)
with tf.device("/GPU:0"):
out = serving(**{input_name: tf.constant(x)})
first_key = list(out.keys())[0]
return out[first_key].numpy()
|