Spaces:
Sleeping
Sleeping
| from economic_kernel import compute_economic_state | |
| from typing import Dict | |
| def economic_snapshot(request: Dict) -> Dict: | |
| state = compute_economic_state( | |
| commodity=request["commodity"], | |
| physical_anchor=float(request["physical_anchor"]), | |
| reporting_lag_days=int(request["reporting_lag_days"]), | |
| ) | |
| return { | |
| "commodity": state.commodity, | |
| "value": state.value, | |
| "timestamp": state.timestamp, | |
| "lag_days": state.reporting_lag_days, | |
| "state_hash": state.state_hash, | |
| } |