Views
No views yet
model.skops) — safe to
load without pickle's arbitrary-code-execution riskdry_spell_rain_mm
flowering_rain_mm
fruitdev_rain_mm
ripening_rain_mm
fruitdev_rain_cv
frost_days_sensitive
mean_annual_temp_c
growing_degree_days
mean_sunshine_ripening
elevation_m
annual_rain_mmtmax_c, tmin_c, tmean_c, precip_mm, et0_mm, sunshine_hours) aggregated over crop-specific
phenological windows — see features.py in the parent repo for exact
definitions (e.g. flowering_rain_mm = total rainfall during the
flowering month(s), frost_days_sensitive = count of nights below the
frost threshold during frost-sensitive months).1from huggingface_hub import hf_hub_download
2import skops.io as sio
3import pandas as pd
4
5model_path = hf_hub_download(repo_id="imaflower/dienbien-coffee-yield", filename="model.skops")
6model = sio.load(model_path, trusted=sio.get_untrusted_types(file=model_path))
7
8X = pd.DataFrame([{
9 "dry_spell_rain_mm": 30, "flowering_rain_mm": 60, "fruitdev_rain_mm": 450,
10 "ripening_rain_mm": 120, "fruitdev_rain_cv": 1.8, "frost_days_sensitive": 1,
11 "mean_annual_temp_c": 21.5, "growing_degree_days": 4200, "mean_sunshine_ripening": 6.2,
12 "elevation_m": 900, "annual_rain_mm": 1600
13}])
14predicted_yield_t_ha = model.predict(X)[0]predict.py).