Spaces:
Build error
Build error
File size: 423 Bytes
d9c9ad1 26cf950 d9c9ad1 26cf950 b75cefa 26cf950 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import gradio as gr
from diffusers import DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1")
def predict(input_img):
predictions = pipeline(input_img)
return predictions
gradio_app = gr.Interface(
predict,
inputs=gr.Textbox(),
outputs=gr.Image(label="Processed Image"),
title="Image Generator",
)
if __name__ == "__main__":
gradio_app.launch() |