import pandas as pd import numpy as np def run_hf_predictions(df: pd.DataFrame) -> pd.DataFrame: """ Simulates Hugging Face-based fault predictions. """ df["HealthScore"] = np.random.uniform(0.2, 1.0, size=len(df)) df["AlertLevel"] = df["HealthScore"].apply( lambda x: "Red" if x < 0.4 else "Yellow" if x < 0.7 else "Green" ) return df