PseudoTerminal X commited on
Commit
7338c67
1 Parent(s): d5e5583

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -1,3 +1,15 @@
1
- import gradio as gr
 
2
 
3
- gr.load("models/ptx0/terminus-xl-velocity-v2").launch()
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import spaces
2
+ from diffusers import DiffusionPipeline
3
 
4
+ pipe = DiffusionPipeline.from_pretrained(...)
5
+ pipe.to('cuda')
6
+
7
+ @spaces.GPU
8
+ def generate(prompt):
9
+ return pipe(prompt).images
10
+
11
+ gr.Interface(
12
+ fn=generate,
13
+ inputs=gr.Text(),
14
+ outputs=gr.Gallery(),
15
+ ).launch()