--- license: cc-by-nc-4.0 datasets: - WenhaoWang/VidProM language: - en --- # Description The first model for automatic text-to-video prompt generation. It finetuned on [VidProM](https://huggingface.co/datasets/WenhaoWang/VidProM) using [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) # Usage ## Download the model ``` from transformers import pipeline pipe = pipeline("text-generation", model="WenhaoWang/AutoT2VPrompt") ``` ## Set the Parameters ``` input = "An undemwater world" max_length = 50 temperature = 1.2 top_k = 8 num_return_sequences = 10 ``` ## Generation ``` all_prompts = pipe(input, max_length = max_length, do_sample = True, temperature = temperature, top_k = top_k, num_return_sequences=num_return_sequences) def process(text): text = text.replace('\n', '.') text = text.replace(' .', '.') text = text[:text.rfind('.')] text = text + '.' return text for i in range(len(num_return_sequences)): print(all_prompts[i]['generated_text']) ``` # Demo