philipp-zettl commited on
Commit
6bc9074
1 Parent(s): fe6636d

Update app.py

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