File size: 911 Bytes
99b9405
 
 
 
 
172f39d
 
99b9405
 
 
 
 
 
 
a758f6c
99b9405
 
c5c9eb9
99b9405
 
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:
  gr.Markdown("# Videobook")
  gr.Markdown("This app generates a Narrated Video from a story.")
  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")
      steps = gr.Radio([25, 50], value = 50, label = "Steps")
    output = gr.outputs.Video()
  run = gr.Button(label = "Generate Video")
  run.click(gen.generate, inputs = [story, api_key, style, tags, model, steps], outputs = output)

demo.launch()