AutoT2VPrompt / README.md
WenhaoWang's picture
Update README.md
14741a8 verified
|
raw
history blame
No virus
1.09 kB
metadata
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 using 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'])

You will get 10 text-to-video prompts, and you can pick one you like most.

Demo