| import gradio as gr | |
| from diffusers import DiffusionPipeline | |
| pipe = DiffusionPipeline.from_pretrained("CompVis/ldm-super-resolution-4x-openimages") | |
| def greet(name): | |
| prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" | |
| image = pipe(prompt).images[0] | |
| return image | |
| demo = gr.Interface(fn=greet, inputs="text", outputs="image") | |
| demo.launch() |