Correct field names

This commit is contained in:
Viet Anh Nguyen 2024-03-12 11:26:50 +07:00
parent 19a220fec5
commit 46ce818fde
2 changed files with 6 additions and 5 deletions

View File

@ -10,7 +10,6 @@ import {
import styled from 'styled-components'; import styled from 'styled-components';
const { Sider, Content } = Layout; const { Sider, Content } = Layout;
import { baseURL } from "request/api"; import { baseURL } from "request/api";
import { useHotkeys } from "react-hotkeys-hook";
import { Viewer } from '@react-pdf-viewer/core'; import { Viewer } from '@react-pdf-viewer/core';
import { SbtPageHeader } from 'components/page-header'; import { SbtPageHeader } from 'components/page-header';
import { UploadOutlined } from '@ant-design/icons'; import { UploadOutlined } from '@ant-design/icons';
@ -19,7 +18,7 @@ import 'react-json-view-lite/dist/index.css';
type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0]; type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0];
const ENABLE_REVIEW = false; const ENABLE_REVIEW = true;
// Import the styles // Import the styles
@ -251,7 +250,9 @@ const InferencePage = () => {
setResponseData(null); setResponseData(null);
return; return;
} }
loadRequestById(data["request_id"]); setTimeout(() => {
loadRequestById(data["request_id"]);
}, 2000);
setFinishedProcessing(true); setFinishedProcessing(true);
return data; return data;
}) })
@ -298,7 +299,7 @@ const InferencePage = () => {
const requestData = fetchRequest(requestID); const requestData = fetchRequest(requestID);
requestData.then(async (data) => { requestData.then(async (data) => {
if (data) setCurrentRequest(data); if (data) setCurrentRequest(data);
const predicted = (data && data["Reviewed Result"]) ? data["Reviewed Result"] : {}; const predicted = (data && data["Predicted Result"]) ? data["Predicted Result"] : {};
const revised = (data && data["Reviewed Result"]) ? data["Reviewed Result"] : {}; const revised = (data && data["Reviewed Result"]) ? data["Reviewed Result"] : {};
const keys = Object.keys(predicted); const keys = Object.keys(predicted);
const tableRows = []; const tableRows = [];

View File

@ -297,7 +297,7 @@ const ReviewPage = () => {
const requestData = fetchRequest(data?.subscription_requests[0].RequestID); const requestData = fetchRequest(data?.subscription_requests[0].RequestID);
requestData.then(async (data) => { requestData.then(async (data) => {
if (data) setCurrentRequest(data); if (data) setCurrentRequest(data);
const predicted = (data && data["Reviewed Result"]) ? data["Reviewed Result"] : {}; const predicted = (data && data["Predicted Result"]) ? data["Predicted Result"] : {};
const submitted = (data && data["Feedback Result"]) ? data["Feedback Result"] : {}; const submitted = (data && data["Feedback Result"]) ? data["Feedback Result"] : {};
const revised = (data && data["Reviewed Result"]) ? data["Reviewed Result"] : {}; const revised = (data && data["Reviewed Result"]) ? data["Reviewed Result"] : {};
const keys = Object.keys(predicted); const keys = Object.keys(predicted);