Instructions to use shailgsits/pan-card-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use shailgsits/pan-card-classifier with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://shailgsits/pan-card-classifier") - Notebooks
- Google Colab
- Kaggle
| from PIL import Image | |
| import numpy as np | |
| IMAGE_SIZE = (224, 224) | |
| def preprocess_image(image: Image.Image): | |
| image = image.convert("RGB") | |
| image = image.resize(IMAGE_SIZE) | |
| image = np.asarray(image).astype("float32") | |
| image /= 255.0 | |
| image = np.expand_dims(image, axis=0) | |
| return image |