Spaces:
Build error
Build error
| 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() |