erikhenriksson's picture
Upload folder using huggingface_hub
77a8ece verified
raw
history blame contribute delete
416 Bytes
import numpy as np
from transformers import AutoModel
# Load sm_subgroup_classifier
sm_classifier = AutoModel.from_pretrained(
"erikhenriksson/sm-subgroup-classifier", trust_remote_code=True
)
# create a random 1024 dimensional embedding
embedding = np.random.rand(1024).astype(np.float32)
# Use - model automatically discovers what's available
result = sm_classifier("fi", "NA-nb", embedding)
print(result)