Skip to content

Commit 78cb8b4

Browse files
committed
fix for bias-detection tool charts
1 parent 86f3bdb commit 78cb8b4

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/assets/bias-detection-python-code.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def run():
267267
if col != targetColumn and col != 'Cluster' and col != "":
268268
setResult(json.dumps({
269269
'type': 'heading',
270-
'key': 'biasAnalysis.distribution.heading',
270+
'headingKey': 'biasAnalysis.distribution.heading',
271271
'params': {'variable': col}
272272
}))
273273
@@ -281,7 +281,7 @@ def run():
281281
if col != targetColumn and col != 'Cluster' and col != "" and col in features:
282282
setResult(json.dumps({
283283
'type': 'heading',
284-
'key': 'biasAnalysis.distribution.heading',
284+
'headingKey': 'biasAnalysis.distribution.heading',
285285
'params': {'variable': col}
286286
}))
287287

src/components/componentMapper.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ export default function ComponentMapper({
131131
className="text-gray-800 font-semibold"
132132
>
133133
{resultItem.headingKey
134-
? t(resultItem.headingKey)
134+
? t(
135+
resultItem.headingKey,
136+
resultItem.params
137+
)
135138
: resultItem.data}
136139
</h5>
137140
);

src/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"error": "Sorry, something went wrong.",
1111
"loadingMessage": "Setting up environment...",
1212
"mostBiasedCluster": "Most biased\n cluster",
13-
"cluster": "Cluster",
13+
"cluster": "Cluster {{value}}",
1414
"exportToPDF": "Export to PDF",
1515
"exportToJSON": "Export synthetic data to JSON",
1616
"downloadButton": "Download",

0 commit comments

Comments
 (0)