From 52c93b18b55ee4e5182c37efe701e1268f42a7ca Mon Sep 17 00:00:00 2001 From: Pavel Torbeev Date: Sun, 10 Sep 2023 07:08:35 +0300 Subject: [PATCH] feat: add total metric --- src/api/process/types.ts | 2 +- src/pages/home/HomePage.tsx | 1 + src/pages/response/ResponsePage.module.scss | 4 ++++ src/pages/response/ResponsePage.tsx | 3 ++- src/pages/response/components/TextItem/TextItem.tsx | 6 ++++++ src/pages/text/TextPage.module.scss | 6 ++++++ src/pages/text/TextPage.tsx | 8 ++++++++ 7 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/api/process/types.ts b/src/api/process/types.ts index d79b37c..bcef77f 100644 --- a/src/api/process/types.ts +++ b/src/api/process/types.ts @@ -5,7 +5,7 @@ export type DetailDescriptor = { features: DetailFeatures; }; -export type ScoreType = 'bert' | 'f' | 'nearest'; +export type ScoreType = 'bert' | 'f' | 'nearest' | 'total'; export type ScoreDescriptor = { [key in ScoreType]: { diff --git a/src/pages/home/HomePage.tsx b/src/pages/home/HomePage.tsx index e6c661d..17fbfa2 100644 --- a/src/pages/home/HomePage.tsx +++ b/src/pages/home/HomePage.tsx @@ -23,6 +23,7 @@ export type FormFields = { files: File[]; }; +// 595491f8-a53e-4af0-91ca-4004a944e645 // 3207 export const PROCESS_POLLING_MS = 2000; diff --git a/src/pages/response/ResponsePage.module.scss b/src/pages/response/ResponsePage.module.scss index c7205de..edfb3eb 100644 --- a/src/pages/response/ResponsePage.module.scss +++ b/src/pages/response/ResponsePage.module.scss @@ -62,6 +62,10 @@ td { @include transition(border-color, color); + &.ResponsePage__result { + font-weight: $font-weight-medium; + } + &.ResponsePage__tableSummary { //@include transition(opacity); //opacity: 0; diff --git a/src/pages/response/ResponsePage.tsx b/src/pages/response/ResponsePage.tsx index 41dd9d9..f485d7a 100644 --- a/src/pages/response/ResponsePage.tsx +++ b/src/pages/response/ResponsePage.tsx @@ -69,7 +69,7 @@ export const ResponsePage: FC = () => { Нейросетевой метод Статистический метод Метод схожести - {/*Рез.*/} + Итоговая оценка Крат. сод. @@ -112,6 +112,7 @@ export const ResponsePage: FC = () => { )} + {text.score.total as unknown as string} = (props) => { +
+ + Итоговая оценка: {text.score.total as unknown as string} + +
+
{ )} + + + Итоговая оценка: {textEntity.score.total as unknown as string} +