Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ subprocess.check_call(["pip", "install", "safetensors"])
|
|
| 6 |
subprocess.check_call(["pip", "install", "transformers"])
|
| 7 |
subprocess.check_call(["pip", "install", "torch"])
|
| 8 |
subprocess.check_call(["pip", "install", "diffusers"])
|
|
|
|
| 9 |
|
| 10 |
import torch
|
| 11 |
from diffusers import StableDiffusionXLPipeline, UNet2DConditionModel, EulerDiscreteScheduler
|
|
@@ -32,7 +33,7 @@ def generate_image(text):
|
|
| 32 |
iface = gr.Interface(
|
| 33 |
fn=generate_image,
|
| 34 |
inputs=gr.Textbox(lines=5, label="Enter a description for the image"),
|
| 35 |
-
outputs=gr.
|
| 36 |
title="Text to Image Generation",
|
| 37 |
description="Enter a text description and get an image.",
|
| 38 |
theme="compact"
|
|
|
|
| 6 |
subprocess.check_call(["pip", "install", "transformers"])
|
| 7 |
subprocess.check_call(["pip", "install", "torch"])
|
| 8 |
subprocess.check_call(["pip", "install", "diffusers"])
|
| 9 |
+
subprocess.check_call(["pip", "install", "accelerate"])
|
| 10 |
|
| 11 |
import torch
|
| 12 |
from diffusers import StableDiffusionXLPipeline, UNet2DConditionModel, EulerDiscreteScheduler
|
|
|
|
| 33 |
iface = gr.Interface(
|
| 34 |
fn=generate_image,
|
| 35 |
inputs=gr.Textbox(lines=5, label="Enter a description for the image"),
|
| 36 |
+
outputs=gr.Image(type="filepath", label="Generated Image"),
|
| 37 |
title="Text to Image Generation",
|
| 38 |
description="Enter a text description and get an image.",
|
| 39 |
theme="compact"
|