Scorpsuki commited on
Commit
0b92a16
·
verified ·
1 Parent(s): 07711bc

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -14
app.py DELETED
@@ -1,14 +0,0 @@
1
- import gradio as gr
2
- from diffusers import StableDiffusionPipeline
3
- import torch
4
-
5
- model_id = "runwayml/stable-diffusion-v1-5"
6
- pipe = StableDiffusionPipeline.from_pretrained(model_id)
7
- pipe = pipe.to("cuda" if torch.cuda.is_available() else "cpu")
8
-
9
- def generate(prompt):
10
- image = pipe(prompt).images[0]
11
- return image
12
-
13
- iface = gr.Interface(fn=generate, inputs="text", outputs="image")
14
- iface.launch()