call ml from views