Spaces:
Runtime error
Runtime error
kevinszeto
commited on
Commit
•
dacb27b
1
Parent(s):
0079783
Add application file
Browse files
app.py
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|
8 |
+
return output
|
9 |
+
|
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",
|
17 |
+
allow_flagging="never"
|
18 |
+
)
|
19 |
+
|
20 |
+
demo.launch(share=True)
|
21 |
+
|