Views
No views yet
model.skops) — safe to
load without pickle's arbitrary-code-execution riskflowering_rain_mm
season_rain_mm
flood_risk_rain_mm
flowering_mean_temp_c
cold_days_flowering
growing_degree_days
mean_sunshine_ripening
elevation_m
season_rain_cvtmax_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-rice-yield", filename="model.skops")
6model = sio.load(model_path, trusted=sio.get_untrusted_types(file=model_path))
7
8X = pd.DataFrame([{
9 "flowering_rain_mm": 150, "season_rain_mm": 1100, "flood_risk_rain_mm": 500,
10 "flowering_mean_temp_c": 24.0, "cold_days_flowering": 0, "growing_degree_days": 3800,
11 "mean_sunshine_ripening": 6.5, "elevation_m": 480, "season_rain_cv": 1.5
12}])
13predicted_yield_t_ha = model.predict(X)[0]predict.py).