Complete the code to define a generative AI model that creates new data.
model = [1]()The generative AI model is designed to create new data similar to the training data. 'GenerativeModel' is the correct choice.
Complete the code to train a generative AI model on data.
model.train([1])Training a generative AI model requires feeding it the training data so it can learn patterns to generate new data.
Fix the error in the code to generate new data from the model.
new_data = model.[1]()To create new data, generative AI models use a 'generate' method, not 'predict' or 'fit'.
Fill both blanks to create a dictionary of generated samples with their lengths.
samples = {sample: len(sample) for sample in model.[1]() if len(sample) [2] 5}The model generates samples using 'generate'. We filter samples longer than 5 using '>'.
Fill all three blanks to create a filtered dictionary of generated samples with their lengths.
filtered = {sample[1]: len(sample) for sample in model.[2]() if len(sample) [3] 10}We transform sample keys to uppercase with '.upper()', generate samples with 'generate()', and filter those longer than 10 with '>'.