kevinszeto commited on
Commit
fc720bb
1 Parent(s): 3e64a2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,7 +1,8 @@
1
  import gradio as gr
2
  import replicate
3
 
4
- def showAnimation(startingPrompt, endingPrompt):
 
5
  model = replicate.models.get("andreasjansson/stable-diffusion-animation")
6
  version = model.versions.get("ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5")
7
  output = version.predict(prompt_start=startingPrompt, prompt_end=endingPrompt)
@@ -10,7 +11,7 @@ def showAnimation(startingPrompt, endingPrompt):
10
  # START OF PAGE
11
  demo = gr.Interface(
12
  fn=showAnimation,
13
- inputs=["text", "text"],
14
  outputs="image",
15
  title = "Stable Diffusion Animation",
16
  description = "Text-to-animation",
 
1
  import gradio as gr
2
  import replicate
3
 
4
+ def showAnimation(api_key, startingPrompt, endingPrompt):
5
+ replicate.Client(api_token=api_key)
6
  model = replicate.models.get("andreasjansson/stable-diffusion-animation")
7
  version = model.versions.get("ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5")
8
  output = version.predict(prompt_start=startingPrompt, prompt_end=endingPrompt)
 
11
  # START OF PAGE
12
  demo = gr.Interface(
13
  fn=showAnimation,
14
+ inputs=["text", "text", "text"],
15
  outputs="image",
16
  title = "Stable Diffusion Animation",
17
  description = "Text-to-animation",