Spaces:
Sleeping
Sleeping
Update modules/huggingface_inference.py
Browse files
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
|
11 |
-
"wind": row
|
12 |
-
"tilt": row
|
13 |
-
"vibration": row
|
14 |
-
"camera": row
|
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)
|