File size: 907 Bytes
c4c0aa1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from Videobook import Videobook
import gradio as gr

gen = Videobook()
with gr.Blocks() as demo:
  with gr.Row():
    with gr.Column():
      story = gr.inputs.Textbox(lines = 5, label = "Story")
      api_key = gr.inputs.Textbox(label = "Segmind API Key")
      tags = gr.inputs.Textbox(default = "high quality, 3d render", label = "Tags")
      style = gr.Dropdown(["Cartoon", "Anime Style", "Realistic Image"], value = "Cartoon", label = "Style")
      model = gr.Dropdown(["Stable Diffusion v2.1", "Kadinsky"], value = "Stable Diffusion v2.1", label = "Model")
      with gr.Row():
        steps = gr.Radio([25, 50], value = 50, label = "Steps")
        fps = gr.Radio([10, 24, 60], value = 10, label = "FPS")
    output = gr.outputs.Video()
  run = gr.Button(label = "Generate Video")
  run.click(gen.generate, inputs = [story, api_key, fps, style, tags, model, steps], outputs = output)

demo.launch()