cakemus commited on
Commit
52e14d6
·
1 Parent(s): 5dc1a58

video model

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,12 +1,11 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
  from spaces import GPU # Import the GPU decorator for ZeroGPU
4
- from PIL import Image
5
 
6
  # Use @GPU to allocate a GPU when running the video generation function
7
  @GPU
8
  def generate_video(prompt):
9
- # Load the Kandinsky video model
10
  video_model = pipeline("video-generation", model="ai-forever/KandinskyVideo_1_1", device=0)
11
  # Generate video based on the prompt
12
  video = video_model(prompt)
@@ -18,7 +17,7 @@ interface = gr.Interface(
18
  inputs=gr.Textbox(label="Enter your prompt here"),
19
  outputs="video",
20
  title="AI Video Generator",
21
- description="This app generates a short video based on your input prompt using KandinskyVideo_1_1.",
22
  theme="dark"
23
  )
24
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
  from spaces import GPU # Import the GPU decorator for ZeroGPU
 
4
 
5
  # Use @GPU to allocate a GPU when running the video generation function
6
  @GPU
7
  def generate_video(prompt):
8
+ # Load the Kandinsky 1.1 video model
9
  video_model = pipeline("video-generation", model="ai-forever/KandinskyVideo_1_1", device=0)
10
  # Generate video based on the prompt
11
  video = video_model(prompt)
 
17
  inputs=gr.Textbox(label="Enter your prompt here"),
18
  outputs="video",
19
  title="AI Video Generator",
20
+ description="This app generates a short video based on your input prompt using Kandinsky 1.1.",
21
  theme="dark"
22
  )
23