Spaces:
Runtime error
Runtime error
Delete app.py
Browse files
app.py
DELETED
|
@@ -1,13 +0,0 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
from diffusers import StableDiffusionPipeline
|
| 3 |
-
|
| 4 |
-
# Load your model (make sure it's downloaded from Hugging Face)
|
| 5 |
-
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v-1-4-original")
|
| 6 |
-
|
| 7 |
-
# Define the function to generate the image
|
| 8 |
-
def generate_image(prompt):
|
| 9 |
-
image = pipe(prompt).images[0]
|
| 10 |
-
return image
|
| 11 |
-
|
| 12 |
-
# Set up Gradio interface
|
| 13 |
-
gr.Interface(fn=generate_image, inputs="text", outputs="image").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|