Instructions to use p2kalita/PolicyLens with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use p2kalita/PolicyLens 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://p2kalita/PolicyLens") - Notebooks
- Google Colab
- Kaggle
Download preprocessor.json from p2kalita/PolicyLens: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/p2kalita/PolicyLens/resolve/main/preprocessor.json
- Command line
-
hf download hf://p2kalita/PolicyLens/preprocessor.json
-
curl -L -o preprocessor.json https://huggingface.co/p2kalita/PolicyLens/resolve/main/preprocessor.json
1.41 kB
| { | |
| "module": "keras_hub.src.models.gemma.gemma_causal_lm_preprocessor", | |
| "class_name": "GemmaCausalLMPreprocessor", | |
| "config": { | |
| "name": "gemma_causal_lm_preprocessor", | |
| "trainable": true, | |
| "dtype": { | |
| "module": "keras", | |
| "class_name": "DTypePolicy", | |
| "config": { | |
| "name": "float32" | |
| }, | |
| "registered_name": null | |
| }, | |
| "tokenizer": { | |
| "module": "keras_hub.src.models.gemma.gemma_tokenizer", | |
| "class_name": "GemmaTokenizer", | |
| "config": { | |
| "name": "gemma_tokenizer", | |
| "trainable": true, | |
| "dtype": { | |
| "module": "keras", | |
| "class_name": "DTypePolicy", | |
| "config": { | |
| "name": "int32" | |
| }, | |
| "registered_name": null | |
| }, | |
| "config_file": "tokenizer.json", | |
| "proto": null, | |
| "sequence_length": null, | |
| "add_bos": false, | |
| "add_eos": false | |
| }, | |
| "registered_name": "keras_hub>GemmaTokenizer" | |
| }, | |
| "config_file": "preprocessor.json", | |
| "sequence_length": 512, | |
| "add_start_token": true, | |
| "add_end_token": true | |
| }, | |
| "registered_name": "keras_hub>GemmaCausalLMPreprocessor" | |
| } |