Skip to content

Commit

Permalink
Merge pull request #1159 from AI4Bharat/lsffix
Browse files Browse the repository at this point in the history
fix for metadata json
  • Loading branch information
ishvindersethi22 authored Feb 19, 2025
2 parents 45264be + 15a7b22 commit 4324eba
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/ui/pages/container/Label-Studio/AllTaskLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ useEffect(() => {
useEffect(() => {
getProjectsandTasks(projectId, taskId).then(
([labelConfig, taskData, annotations, predictions]) => {
const inputData = new DatasetSearchPopupAPI({"instance_ids":labelConfig.datasets[0].instance_id,"dataset_type":"OCRDocument","search_keys":{"id":taskData.input_data}});
dispatch(APITransport(inputData));
if(labelConfig?.project_type?.includes("OCRTranscriptionEditing")){
const inputData = new DatasetSearchPopupAPI({"instance_ids":labelConfig.datasets[0].instance_id,"dataset_type":"OCRDocument","search_keys":{"id":taskData.input_data}});
dispatch(APITransport(inputData));
}
let sidePanel = labelConfig?.project_type?.includes("OCRSegmentCategorization") || labelConfig?.project_type?.includes("OCRTranscriptionEditing");
let showLabelsOnly = labelConfig?.project_type?.includes("OCRSegmentCategorization");
let selectAfterCreateOnly = labelConfig?.project_type?.includes("OCRSegmentCategorization");
Expand Down
6 changes: 4 additions & 2 deletions src/ui/pages/container/Label-Studio/LSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ const LabelStudioWrapper = ({
useEffect(() => {
getProjectsandTasks(projectId, taskId).then(
([labelConfig, taskData, annotations, predictions]) => {
const inputData = new DatasetSearchPopupAPI({"instance_ids":labelConfig.datasets[0].instance_id,"dataset_type":"OCRDocument","search_keys":{"id":taskData.input_data}});
dispatch(APITransport(inputData));
if(labelConfig?.project_type?.includes("OCRTranscriptionEditing")){
const inputData = new DatasetSearchPopupAPI({"instance_ids":labelConfig.datasets[0].instance_id,"dataset_type":"OCRDocument","search_keys":{"id":taskData.input_data}});
dispatch(APITransport(inputData));
}
let sidePanel = labelConfig?.project_type?.includes("OCRSegmentCategorization") || labelConfig?.project_type?.includes("OCRTranscriptionEditing");
let showLabelsOnly = labelConfig?.project_type?.includes("OCRSegmentCategorization");
let selectAfterCreateOnly = labelConfig?.project_type?.includes("OCRSegmentCategorization");
Expand Down
6 changes: 4 additions & 2 deletions src/ui/pages/container/Label-Studio/ReviewLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,10 @@ useEffect(() => {
useEffect(() => {
getProjectsandTasks(projectId, taskId).then(
([labelConfig, taskData, annotations, predictions]) => {
const inputData = new DatasetSearchPopupAPI({"instance_ids":labelConfig.datasets[0].instance_id,"dataset_type":"OCRDocument","search_keys":{"id":taskData.input_data}});
dispatch(APITransport(inputData));
if(labelConfig?.project_type?.includes("OCRTranscriptionEditing")){
const inputData = new DatasetSearchPopupAPI({"instance_ids":labelConfig.datasets[0].instance_id,"dataset_type":"OCRDocument","search_keys":{"id":taskData.input_data}});
dispatch(APITransport(inputData));
}
let sidePanel = labelConfig?.project_type?.includes("OCRSegmentCategorization") || labelConfig?.project_type?.includes("OCRTranscriptionEditing");
let showLabelsOnly = labelConfig?.project_type?.includes("OCRSegmentCategorization");
let selectAfterCreateOnly = labelConfig?.project_type?.includes("OCRSegmentCategorization");
Expand Down
6 changes: 4 additions & 2 deletions src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ useEffect(() => {
useEffect(() => {
getProjectsandTasks(projectId, taskId).then(
([labelConfig, taskData, annotations, predictions]) => {
const inputData = new DatasetSearchPopupAPI({"instance_ids":labelConfig.datasets[0].instance_id,"dataset_type":"OCRDocument","search_keys":{"id":taskData.input_data}});
dispatch(APITransport(inputData));
if(labelConfig?.project_type?.includes("OCRTranscriptionEditing")){
const inputData = new DatasetSearchPopupAPI({"instance_ids":labelConfig.datasets[0].instance_id,"dataset_type":"OCRDocument","search_keys":{"id":taskData.input_data}});
dispatch(APITransport(inputData));
}
let sidePanel = labelConfig?.project_type?.includes("OCRSegmentCategorization") || labelConfig?.project_type?.includes("OCRTranscriptionEditing");
let showLabelsOnly = labelConfig?.project_type?.includes("OCRSegmentCategorization");
let selectAfterCreateOnly = labelConfig?.project_type?.includes("OCRSegmentCategorization");
Expand Down

0 comments on commit 4324eba

Please sign in to comment.