A portfolio generator

i want to create an ai based ml model which will build a portfolio for beginners which will take input from user that how much they to want to invest in stock market according to their risk tolerance level which will also be inputted by the user on the scale of 1 to 10 (increasing risk in ascending order )