Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|