Instructions to use defendrite/binary-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use defendrite/binary-classifier with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://defendrite/binary-classifier") - Notebooks
- Google Colab
- Kaggle
Download config.json from defendrite/binary-classifier: direct link, hf CLI and curl.
- Browser
- Download file 537 Bytes
-
https://huggingface.co/defendrite/binary-classifier/resolve/main/config.json
- Command line
-
hf download hf://defendrite/binary-classifier/config.json
-
curl -L -o config.json https://huggingface.co/defendrite/binary-classifier/resolve/main/config.json
537 Bytes
| { | |
| "name": "cats-vs-dogs-classifier", | |
| "repo_id": "", | |
| "format": "onnx", | |
| "input_name": "input", | |
| "input_shape": [ | |
| 1, | |
| 3, | |
| 128, | |
| 128 | |
| ], | |
| "output_name": "output", | |
| "output_type": "logits", | |
| "num_classes": 2, | |
| "labels": [ | |
| "cat", | |
| "dog" | |
| ], | |
| "image_size": 128, | |
| "normalization": { | |
| "mean": [ | |
| 0.485, | |
| 0.456, | |
| 0.406 | |
| ], | |
| "std": [ | |
| 0.229, | |
| 0.224, | |
| 0.225 | |
| ] | |
| } | |
| } |