import { debounce } from"@mbostock/debouncing-input"import {Plot} from"@observablehq/plot";functiontransformToUrl(description, top_k) {// Base URLconst baseUrl ="https://codification-ape-pytorch.lab.sspcloud.fr/predict-and-explain";// Encode the description to make it URL-safeconst encodedDescription =encodeURIComponent(description);// Append parameters to the URLconst fullUrl =`${baseUrl}?text_description=${encodedDescription}&prob_min=0.01&top_k=${top_k}`;return fullUrl;}functiongenerateLetterLabels(length) {returnArray.from({ length }, (_, i) =>String.fromCharCode(65+ (i %26)));}