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
| args <- commandArgs(trailingOnly = FALSE) | |
| script_arg <- grep("^--file=", args, value = TRUE) | |
| if (length(script_arg) > 0) { | |
| script_path <- normalizePath(sub("^--file=", "", script_arg[1])) | |
| setwd(normalizePath(file.path(dirname(script_path), ".."))) | |
| } | |
| library(reticulate) | |
| use_python(Sys.getenv("RETICULATE_PYTHON"), required = TRUE) | |
| np <- import("numpy", convert = FALSE) | |
| save_npz <- function(out_file, x_train, y_train, x_test, y_test) { | |
| np$savez_compressed( | |
| out_file, | |
| x_train = np$array(readRDS(x_train), dtype = "float32"), | |
| y_train = np$array(readRDS(y_train), dtype = "float32"), | |
| x_test = np$array(readRDS(x_test), dtype = "float32"), | |
| y_test = np$array(readRDS(y_test), dtype = "float32") | |
| ) | |
| } | |
| save_npz("model/CNN/c1_data.npz", "model/CNN/c1_train.RDS", "model/CNN/c1_train_y.RDS", "model/CNN/c1_test.RDS", "model/CNN/c1_test_y.RDS") | |
| save_npz("model/CNN/p1_data.npz", "model/CNN/p1_train.RDS", "model/CNN/p1_train_y.RDS", "model/CNN/p1_test.RDS", "model/CNN/p1_test_y.RDS") | |
| cat("export cnn npz OK\n") | |