Spaces:
Runtime error
Runtime error
laizeqiang
commited on
Commit
·
609538a
1
Parent(s):
38e694c
update
Browse files
app.py
CHANGED
@@ -5,26 +5,26 @@ from anything2image.api import Anything2Image
|
|
5 |
anything2img = Anything2Image(imagebind_download_dir='checkpoints')
|
6 |
|
7 |
with gr.Blocks() as demo:
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
demo.queue(1).launch()
|
30 |
|
|
|
5 |
anything2img = Anything2Image(imagebind_download_dir='checkpoints')
|
6 |
|
7 |
with gr.Blocks() as demo:
|
8 |
+
gr.HTML(
|
9 |
+
"""
|
10 |
+
<div align='center'> <h1>Anything To Image </h1> </div>
|
11 |
+
<p align="center"> Generate image from anything with ImageBind's unified latent space and stable-diffusion-2-1-unclip. </p>
|
12 |
+
<p align="center"><a href="https://github.com/Zeqiang-Lai/Anything2Image"><b>https://github.com/Zeqiang-Lai/Anything2Image</b></p>
|
13 |
+
""")
|
14 |
+
gr.Interface(fn=anything2img,
|
15 |
+
inputs=[gr.Textbox(placeholder="Enter a prompt in addition to the audio, image, text condition below", label="Prompt (Optional)"),
|
16 |
+
gr.Audio(label="Audio Condition"),
|
17 |
+
gr.Image(label="Image Condition"),
|
18 |
+
gr.Textbox(label="Text Condition"),
|
19 |
+
],
|
20 |
+
outputs=[gr.Image(label="Generated Image")],
|
21 |
+
examples=[['', 'assets/wav/dog_audio.wav', None, None],
|
22 |
+
['A painting', 'assets/wav/cat.wav', None, None],
|
23 |
+
['', 'assets/wav/wave.wav', 'assets/image/bird.png', None],
|
24 |
+
['', None, 'assets/image/bird_image.jpg', None],
|
25 |
+
['', None, None, 'A sunset over the ocean.'],
|
26 |
+
],
|
27 |
+
cache_examples=True,
|
28 |
+
)
|
29 |
demo.queue(1).launch()
|
30 |
|