From 89aa3b34eb0f119682271fbced65430bb6ff198e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sara=20Hincapi=C3=A9=20M?= <43832784+shincap8@users.noreply.github.com> Date: Tue, 10 Sep 2024 10:49:28 -0500 Subject: [PATCH] Change Nibblers PlaceHolder following their instructions (#303) --- .../SelectBetweenImagesGenerative.tsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectBetweenImagesGenerative.tsx b/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectBetweenImagesGenerative.tsx index 153141cb..8ea9d6ca 100644 --- a/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectBetweenImagesGenerative.tsx +++ b/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectBetweenImagesGenerative.tsx @@ -35,15 +35,15 @@ const SelectBetweenImagesGenerative: FC< const [showImages, setShowImages] = useState([]); const [isMobile, setIsMobile] = useState(false); const [artifactsInput, setArtifactsInput] = useState( - generative_context.artifacts, + generative_context.artifacts ); const [prompt, setPrompt] = useState( - "Type your prompt here (e.g. a kid sleeping in a red pool of paint)", + "People from {region} doing a {local activity}. Eg. 'Old Bhopalis sitting near 10 number market'." ); const { post, response } = useFetch(); const { user } = useContext(UserContext); const { modelInputs, metadataExample, updateModelInputs } = useContext( - CreateInterfaceContext, + CreateInterfaceContext ); const neccessaryFields = ["original_prompt"]; const [selectedImage, setSelectedImage] = useState(""); @@ -54,7 +54,7 @@ const SelectBetweenImagesGenerative: FC< { task_id: taskId, user_id: user.id, - }, + } ); if (response.ok) { setPromptHistory(history); @@ -83,7 +83,7 @@ const SelectBetweenImagesGenerative: FC< const saveHistoricalData = async ( text: string, - setPromptHistory: (value: any[]) => void, + setPromptHistory: (value: any[]) => void ) => { const history = await post("/historical_data/save_historical_data", { task_id: taskId, @@ -110,7 +110,7 @@ const SelectBetweenImagesGenerative: FC< task_id: taskId, user_id: user.id, data: prompt.trim(), - }, + } ); if (checkIfPromptExistsForUser) { setFirstMessageReceived(true); @@ -125,7 +125,7 @@ const SelectBetweenImagesGenerative: FC< body: JSON.stringify({ task_id: taskId, }), - }, + } ); const promptWithMoreThanOneHundredSubmissions = @@ -133,7 +133,7 @@ const SelectBetweenImagesGenerative: FC< const checkIfPromptIsInOccurrences = promptWithMoreThanOneHundredSubmissions.some( - (item: any) => item === prompt.trim(), + (item: any) => item === prompt.trim() ); if (checkIfPromptIsInOccurrences) { Swal.fire({ @@ -151,7 +151,7 @@ const SelectBetweenImagesGenerative: FC< neccessaryFields.every( (item) => modelInputs.hasOwnProperty(item) || - metadataExample.hasOwnProperty(item), + metadataExample.hasOwnProperty(item) ) ) { setShowLoader(true); @@ -174,7 +174,7 @@ const SelectBetweenImagesGenerative: FC< prompt_with_more_than_one_hundred: checkIfPromptIsInOccurrences, }, }), - }, + } ); const imagesHttp = await response.json(); @@ -212,7 +212,7 @@ const SelectBetweenImagesGenerative: FC< { round_id: realRoundId, user_id: user.id, - }, + } ); } else { Swal.fire({ @@ -270,7 +270,7 @@ const SelectBetweenImagesGenerative: FC< prompt_with_more_than_one_hundred: checkIfPromptIsInOccurrences, }, }), - }, + } ); const imagesHttp = await response.json(); @@ -325,7 +325,7 @@ const SelectBetweenImagesGenerative: FC< user_id: user.id, round_id: realRoundId, task_id: taskId, - }, + } ); if (response.ok) { setPartialSampleId(partialSampleId.id);