+
+
{item.text}
+
+
+
Toxicity Score: {item.perspective.attributeScores.TOXICITY.summaryScore.value}
+
Severe Toxicity Score: {item.perspective.attributeScores.SEVERE_TOXICITY.summaryScore.value}
+
Identity Attack: {item.perspective.attributeScores.IDENTITY_ATTACK.summaryScore.value}
+
Insult Score: {item.perspective.attributeScores.INSULT.summaryScore.value}
+
Profanity Score: {item.perspective.attributeScores.PROFANITY.summaryScore.value}
+
Threat Score: {item.perspective.attributeScores.THREAT.summaryScore.value}
+
Sexually Explicit Score: {item.perspective.attributeScores.SEXUALLY_EXPLICIT.summaryScore.value}
+
Flirtation Score: {item.perspective.attributeScores.FLIRTATION.summaryScore.value}
+
+
+ );
+ };
+
return (
-
-
- Text Generation Results
-
-
-
+
+
Results analysis
+ {this.props.generatedResults.map(renderResult)}
+
);
}
}
diff --git a/frontend/index.tsx b/frontend/index.tsx
index 8093b96..cf8457b 100644
--- a/frontend/index.tsx
+++ b/frontend/index.tsx
@@ -2,8 +2,8 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
-import rootReducer from './reducers.ts'
-import MainContainer from "./MainContainer.tsx";
+import rootReducer from './reducers'
+import MainContainer from "./MainContainer";
import { createLogger } from 'redux-logger';
import thunkMiddleware from 'redux-thunk';
import { initializeIcons } from 'office-ui-fabric-react/lib/Icons';
diff --git a/package-lock.json b/package-lock.json
index 9c58d67..6d616a1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2102,6 +2102,11 @@
"integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
"dev": true
},
+ "@types/lodash": {
+ "version": "4.14.169",
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.169.tgz",
+ "integrity": "sha512-DvmZHoHTFJ8zhVYwCLWbQ7uAbYQEk52Ev2/ZiQ7Y7gQGeV9pjBqjnQpECMHfKS1rCYAhMI7LHVxwyZLZinJgdw=="
+ },
"@types/minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz",
diff --git a/package.json b/package.json
index 087b56e..d7ded3c 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,11 @@
{
"dependencies": {
+ "@types/lodash": "^4.14.169",
"axios": "^0.21.1",
"d3": "^5.16.0",
- "office-ui-fabric-react": "^7.117.0",
"jquery": "^3.5.1",
- "lodash": "^4.17.11",
+ "lodash": "^4.17.21",
+ "office-ui-fabric-react": "^7.117.0",
"plotly.js-dist": "^1.54.7",
"react": "^16.7.0",
"react-dom": "^16.7.0",
@@ -35,7 +36,7 @@
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
- "cross-env": "^7.0.2",
+ "cross-env": "^7.0.3",
"css-loader": "^4.3.0",
"html-webpack-plugin": "^4.5.0",
"jest": "^26.6.0",
diff --git a/transformerviz/assets/index.html b/transformerviz/assets/index.html
index 65877d2..b7deb36 100644
--- a/transformerviz/assets/index.html
+++ b/transformerviz/assets/index.html
@@ -6,19 +6,19 @@
-