Instructions to use BunkerMinecraft/NeuRecAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use BunkerMinecraft/NeuRecAI 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://BunkerMinecraft/NeuRecAI") - Notebooks
- Google Colab
- Kaggle
Update inference.py
Browse files- inference.py +4 -2
inference.py
CHANGED
|
@@ -3,8 +3,10 @@ import json
|
|
| 3 |
from PIL import Image
|
| 4 |
import numpy as np
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
class_names = ['battery', 'glass', 'metal', 'organic', 'paper', 'plastic']
|
| 10 |
|
|
|
|
| 3 |
from PIL import Image
|
| 4 |
import numpy as np
|
| 5 |
|
| 6 |
+
cfg = None
|
| 7 |
+
if os.path.exists("config.json"):
|
| 8 |
+
with open("config.json") as f:
|
| 9 |
+
cfg = json.load(f)
|
| 10 |
|
| 11 |
class_names = ['battery', 'glass', 'metal', 'organic', 'paper', 'plastic']
|
| 12 |
|