Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,24 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
import spaces
|
3 |
|
4 |
+
@spaces.GPU
|
5 |
+
def generate_image(prompt, negative_prompt="", seed=0, width=512, height=512, guidance_scale=3.5, num_inference_steps=50):
|
6 |
+
# This function will be called by gr.load(), so we don't need to implement it here
|
7 |
+
pass
|
8 |
+
|
9 |
+
examples = [
|
10 |
+
["d3xt3r dachshund A happy dachshund wearing a space helmet, exploring a colorful alien planet"],
|
11 |
+
["d3xt3r dachshund A dachshund dressed as a detective, investigating a mysterious toy in a cozy living room"],
|
12 |
+
["d3xt3r dachshund A playful dachshund running through a field of flowers on a sunny day"],
|
13 |
+
]
|
14 |
+
|
15 |
+
demo = gr.load("models/GenAIJake/d3xt3r")
|
16 |
+
|
17 |
+
# Customize the interface
|
18 |
+
with demo:
|
19 |
+
gr.Markdown("# D3XT3R Dachshund Image Generator")
|
20 |
+
gr.Examples(examples, inputs=demo.input_components)
|
21 |
+
|
22 |
+
# Add GPUZero functionality
|
23 |
+
demo.queue()
|
24 |
+
demo.launch()
|