age_gender_classifier / inferece.py
OmarHashem80's picture
Upload folder using huggingface_hub
d23b3a1 verified
raw
history blame contribute delete
252 Bytes
import joblib
import numpy as np
model = joblib.load("classifier.joblib")
def predict(inputs):
X = np.array([[v for v in sample.values()] for sample in inputs])
predictions = model.predict(X)
return [int(p) for p in predictions]