myspace / app.py
Kev09's picture
Update app.py
ba79bbb verified
raw
history blame contribute delete
446 Bytes
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()