Sanjayraju30 commited on
Commit
e86197f
·
verified ·
1 Parent(s): 299d199

Update modules/huggingface_inference.py

Browse files
Files changed (1) hide show
  1. modules/huggingface_inference.py +5 -5
modules/huggingface_inference.py CHANGED
@@ -7,11 +7,11 @@ def predict_alerts(df, hf_url, hf_token):
7
  for _, row in df.iterrows():
8
  input_payload = {
9
  "inputs": {
10
- "solar": row["Solar_Gen__c"],
11
- "wind": row["Wind_Gen__c"],
12
- "tilt": row["Tilt__c"],
13
- "vibration": row["Vibration__c"],
14
- "camera": row["Camera_Status__c"]
15
  }
16
  }
17
  response = requests.post(hf_url, headers=headers, json=input_payload)
 
7
  for _, row in df.iterrows():
8
  input_payload = {
9
  "inputs": {
10
+ "solar": row.get("Solar_Generation__c"),
11
+ "wind": row.get("Wind_Generation__c"),
12
+ "tilt": row.get("Tilt__c"),
13
+ "vibration": row.get("Vibration__c"),
14
+ "camera": row.get("Camera_Status__c")
15
  }
16
  }
17
  response = requests.post(hf_url, headers=headers, json=input_payload)