def preprocess(self, payload: float | None) -> float | int | None:
        """
        Parameters:
            payload: the field value.
        Returns:
            Passes field value as a `float` or `int` into the function, depending on `precision`.
        """
        if payload is None:
            return None
        elif self.minimum is not None and payload < self.minimum:
            raise Error(f"Value {payload} is less than minimum value {self.minimum}.")
        elif self.maximum is not None and payload > self.maximum:
            raise Error(
                f"Value {payload} is greater than maximum value {self.maximum}."
            )
        return self._round_to_precision(payload, self.precision)

        Parameters:
            payload: the field value.
        Returns:
            Passes field value as a `float` or `int` into the function, depending on `precision`.
        
gradio/components/number.py