Instructions to use kisambu/tuberculoscan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use kisambu/tuberculoscan 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://kisambu/tuberculoscan") - Notebooks
- Google Colab
- Kaggle
Download application2/lib/convertir.py from kisambu/tuberculoscan: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/kisambu/tuberculoscan/resolve/main/application2/lib/convertir.py
- Command line
-
hf download hf://kisambu/tuberculoscan/application2/lib/convertir.py
-
curl -L -o convertir.py https://huggingface.co/kisambu/tuberculoscan/resolve/main/application2/lib/convertir.py
491 Bytes
| # Script Python pour convertir le modèle | |
| import tensorflow as tf | |
| # Charger votre modèle Keras | |
| model = tf.keras.models.load_model('C:/Users/Grace/Documents/deploiementClassificationStreamlit/mon_modele_final.keras') | |
| # Convertir en TFLite | |
| converter = tf.lite.TFLiteConverter.from_keras_model(model) | |
| converter.optimizations = [tf.lite.Optimize.DEFAULT] | |
| tflite_model = converter.convert() | |
| # Sauvegarder | |
| with open('mon_modele_final.tflite', 'wb') as f: | |
| f.write(tflite_model) |