Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
def greet(name):
|
4 |
-
|
|
|
|
|
5 |
|
6 |
-
demo = gr.Interface(fn=greet, inputs="text", outputs="
|
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()
|