from ebonite.core.objects.core import Model


def create_model(model_object, input_data, model_name: str = None) -> Model:
    """
    Creates Model instance from arbitrary model objects and sample of input data

    :param model_object: model object (function, sklearn model, tensorflow output tensor list etc)
    :param input_data: sample of input data (numpy array, pandas dataframe, feed dict etc)
    :param model_name: name for model in database, if not provided will be autogenerated
    :return: :class:`~ebonite.core.objects.core.Model` instance
    """
    return Model.create(model_object, input_data, model_name)
