Instructions to use govtech/lionguard-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use govtech/lionguard-v1 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("govtech/lionguard-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
fix: correct typo
Browse files- inference.py +1 -1
inference.py
CHANGED
|
@@ -51,7 +51,7 @@ def predict(batch_text):
|
|
| 51 |
for category, details in config['classifier'].items():
|
| 52 |
|
| 53 |
# Download the classifier from HuggingFace hub
|
| 54 |
-
local_model_fp = hf_hub_download(repo_id = repo_path, filename = config['
|
| 55 |
|
| 56 |
# Run the inference
|
| 57 |
session = rt.InferenceSession(local_model_fp)
|
|
|
|
| 51 |
for category, details in config['classifier'].items():
|
| 52 |
|
| 53 |
# Download the classifier from HuggingFace hub
|
| 54 |
+
local_model_fp = hf_hub_download(repo_id = repo_path, filename = config['classifier'][category]['model_fp'])
|
| 55 |
|
| 56 |
# Run the inference
|
| 57 |
session = rt.InferenceSession(local_model_fp)
|