Instructions to use nico9ga/fruits-Classification-Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use nico9ga/fruits-Classification-Model with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://nico9ga/fruits-Classification-Model") - Notebooks
- Google Colab
- Kaggle
| from prediction import predict_class | |
| import tensorflow as tf | |
| # Cargar el modelo | |
| new_model = tf.keras.models.load_model('fruits_detection.keras') | |
| # Funci贸n para manejar la solicitud de predicci贸n | |
| def predict_image(image_path): | |
| predicted_class = predict_class(new_model, image_path) | |
| return {"predicted_class": predicted_class} |