From 1f492574d015601ef4bd21bb50e75cff9663fd3f Mon Sep 17 00:00:00 2001 From: amirnd51 Date: Tue, 23 Jul 2024 19:10:31 +0000 Subject: [PATCH 1/9] [WIP}Refactor input handling to use src property consistently --- .../Experiment/QuickOutput/InputPreview.js | 8 +- .../QuickOutput/MultiInputPreview.js | 111 ++++---- .../ObjectDetection/ObjectDetection.js | 2 +- .../StyleTransfer/StyleTransferOutput.js | 1 + .../QuickOutput/Outputs/Text/useTextOutput.js | 2 +- .../TextConversationOutput.js | 252 +++++++++--------- .../Experiment/QuickOutput/QuickOutput.js | 1 + .../ExperimentDetails/Inputs/InputPreview.js | 4 +- .../Summaries/ImageEnhancementSummary.js | 2 +- .../Summaries/ObjectDetectionSummary.js | 2 +- .../ExperimentDetails/TrialOutputWrapper.jsx | 2 +- 11 files changed, 201 insertions(+), 186 deletions(-) diff --git a/src/components/Experiment/QuickOutput/InputPreview.js b/src/components/Experiment/QuickOutput/InputPreview.js index 36b807fc..cb0ba482 100644 --- a/src/components/Experiment/QuickOutput/InputPreview.js +++ b/src/components/Experiment/QuickOutput/InputPreview.js @@ -17,17 +17,19 @@ export default function InputPreview(givenProps) { image: "Image", audio: "Audio", text: "Text", + document: "Document", }; const getInput = () => { switch (props.inputType) { case "text": - return

{props.input}

; + return

{props.input.src}

; case "audio": - return