i would like to knw if it is posible to generate a...
# ask-marvin
p
i would like to knw if it is posible to generate an input variable in the paraemters dashaboard, with a button that make possible to select to use a dictionary as a variable or a float, like the boolean toggle, with useing in both of them values by default. This input right here is the one i have right now, and i would like to adapt to the new functionlaity of having two different values, dict and float
Copy code
mip_ratio_thresholds: Union[Dict[str, confloat(ge=0, le=1)], float] = Field(
    default={
        "0": 0.10, "1": 0.35, "2": 0.50, "3": 0.20, "4": 0.80, "5": 0.45, "6": 0.60, "7": 0.30, "8": 0.15,
        "9": 0.55, "10": 0.25, "11": 0.70, "12": 0.40, "13": 0.90, "14": 0.65, "15": 0.75, "16": 0.85,
        "17": 0.33, "18": 0.12, "19": 0.58, "20": 0.22, "21": 0.48, "22": 0.95, "23": 0.52, "24": 0.18,
        "25": 0.28, "26": 0.68, "27": 0.88},
    description=(
        """
    ),
    title=""
)