Kev09 commited on
Commit
c9c273d
·
verified ·
1 Parent(s): 528d5ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -1,7 +1,16 @@
1
  import gradio as gr
2
 
 
 
 
 
 
 
 
3
  def greet(name):
4
- return "Hello " + name + "!!"
 
 
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  demo.launch()
 
1
  import gradio as gr
2
 
3
+ from diffusers import DiffusionPipeline
4
+
5
+ pipe = DiffusionPipeline.from_pretrained("CompVis/ldm-super-resolution-4x-openimages")
6
+
7
+
8
+
9
+
10
  def greet(name):
11
+ prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
12
+ image = pipe(prompt).images[0]
13
+ return image
14
 
15
+ demo = gr.Interface(fn=greet, inputs="text", outputs="image")
16
  demo.launch()