mariamSoub commited on
Commit
522bb67
·
verified ·
1 Parent(s): 4eca08a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -172,7 +172,9 @@ def rule_based_bias_check(text):
172
  "not suited",
173
  "naturally better",
174
  "are better than",
175
- "are worse than"
 
 
176
  ]
177
 
178
  # Gender bias
@@ -504,6 +506,9 @@ Samples collected: {len(ALL_Y_TRUE)}
504
  "bias_types": rule_check["bias_types"],
505
  "demographic_group": rule_check["demographic_group"]
506
  }
 
 
 
507
 
508
  # 🔥 OVERRIDE DISPLAY OUTPUT (THIS IS THE MISSING PIECE)
509
  bias_analysis = f"""Q1. Biased: biased
 
172
  "not suited",
173
  "naturally better",
174
  "are better than",
175
+ "are worse than",
176
+ "tend to be",
177
+ "more emotional",
178
  ]
179
 
180
  # Gender bias
 
506
  "bias_types": rule_check["bias_types"],
507
  "demographic_group": rule_check["demographic_group"]
508
  }
509
+ # 🔥 FORCE CONSISTENCY (THIS IS THE REAL FIX)
510
+ if parsed["bias_types"]:
511
+ parsed["biased"] = True
512
 
513
  # 🔥 OVERRIDE DISPLAY OUTPUT (THIS IS THE MISSING PIECE)
514
  bias_analysis = f"""Q1. Biased: biased