File size: 443 Bytes
ffafa92 ce57433 ffafa92 ce57433 ffafa92 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # model.py
def predict_metals(input_df):
import joblib
# Load the trained model
model = joblib.load("geo_metals_model_fixed.joblib")
# Predict using the model
preds = model.predict(input_df)[0]
# Return results with expected keys
return {
"Fe_ppm": preds[0],
"Cr_ppm": preds[1],
"Mn_ppm": preds[2],
"Mo_ppm": preds[3],
"In_ppm": preds[4],
"Ta_ppm": preds[5],
}
|