Spaces:
Runtime error
Runtime error
Update app.py
Browse filesadd regard classifier
app.py
CHANGED
|
@@ -342,6 +342,10 @@ def analyze_response(user_response):
|
|
| 342 |
"", user_response, bias_pipe, regard_classifier
|
| 343 |
)
|
| 344 |
bias_analysis = analysis_result["bias_analysis"]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 345 |
|
| 346 |
# MNLI fairness signal
|
| 347 |
mnli_rating = mnli_bias_score(user_response)
|
|
|
|
| 342 |
"", user_response, bias_pipe, regard_classifier
|
| 343 |
)
|
| 344 |
bias_analysis = analysis_result["bias_analysis"]
|
| 345 |
+
|
| 346 |
+
print("\nRegard Analysis:")
|
| 347 |
+
print(f"Label: {analysis_result['regard_label']}")
|
| 348 |
+
print(f"Score: {analysis_result['regard_score']:.2f}")
|
| 349 |
|
| 350 |
# MNLI fairness signal
|
| 351 |
mnli_rating = mnli_bias_score(user_response)
|