File size: 446 Bytes
20a639e ba79bbb c9c273d 20a639e c9c273d a4b7992 c9c273d 20a639e ba79bbb 20a639e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import gradio as gr
from PIL import Image
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]
print("IMAGE: \n",image)
return image
demo = gr.Interface(fn=greet, inputs="text", outputs=gr.Image(type="pil"))
demo.launch() |