pratikshahp commited on
Commit
3ad1ca5
·
verified ·
1 Parent(s): 5dcf323

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ def process_csv(file):
17
  if "Feedback" not in df.columns or "Employee" not in df.columns:
18
  return None, "❌ Error: CSV must contain 'Employee' and 'Feedback' columns."
19
  df["Sentiment"] = df["Feedback"].apply(lambda x: pipe(x)[0]["label"])
20
- return {"df": df}, "✅ CSV processed!"
21
 
22
  def predict_attrition_risk(employee_name: str, sentiment: str, explanation: str):
23
  risk_mapping = {"positive": "Low Risk", "neutral": "Medium Risk", "negative": "High Risk"}
 
17
  if "Feedback" not in df.columns or "Employee" not in df.columns:
18
  return None, "❌ Error: CSV must contain 'Employee' and 'Feedback' columns."
19
  df["Sentiment"] = df["Feedback"].apply(lambda x: pipe(x)[0]["label"])
20
+ return {"df": df}, "✅ Your CSV file is processed!"
21
 
22
  def predict_attrition_risk(employee_name: str, sentiment: str, explanation: str):
23
  risk_mapping = {"positive": "Low Risk", "neutral": "Medium Risk", "negative": "High Risk"}