Update app.py
Browse files
app.py
CHANGED
|
@@ -29,10 +29,33 @@ def infer(prompt, init_image):
|
|
| 29 |
|
| 30 |
return res.images[0]
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
prompt_input = gr.Textbox()
|
| 34 |
image_init = gr.Image(source="upload", type="filepath")
|
| 35 |
image_output = gr.Image()
|
| 36 |
|
| 37 |
-
demo = gr.Interface(fn=infer, inputs=[prompt_input, image_init], outputs=image_output)
|
| 38 |
demo.launch()
|
|
|
|
| 29 |
|
| 30 |
return res.images[0]
|
| 31 |
|
| 32 |
+
title = """
|
| 33 |
+
<div style="text-align: center; max-width: 650px; margin: 0 auto;">
|
| 34 |
+
<div
|
| 35 |
+
style="
|
| 36 |
+
display: inline-flex;
|
| 37 |
+
align-items: center;
|
| 38 |
+
gap: 0.8rem;
|
| 39 |
+
font-size: 1.75rem;
|
| 40 |
+
"
|
| 41 |
+
>
|
| 42 |
+
<h1 style="font-weight: 900; margin-bottom: 7px;">
|
| 43 |
+
Imagic Stable Diffusion • Community Pipeline
|
| 44 |
+
</h1>
|
| 45 |
+
</div>
|
| 46 |
+
<p style="margin-bottom: 10px; font-size: 94%">
|
| 47 |
+
Text-Based Real Image Editing with Diffusion Models
|
| 48 |
+
</p>
|
| 49 |
+
</div>
|
| 50 |
+
"""
|
| 51 |
+
|
| 52 |
+
article = """
|
| 53 |
+
|
| 54 |
+
"""
|
| 55 |
|
| 56 |
prompt_input = gr.Textbox()
|
| 57 |
image_init = gr.Image(source="upload", type="filepath")
|
| 58 |
image_output = gr.Image()
|
| 59 |
|
| 60 |
+
demo = gr.Interface(fn=infer, inputs=[prompt_input, image_init], outputs=image_output, title=title)
|
| 61 |
demo.launch()
|