laizeqiang commited on
Commit
609538a
·
1 Parent(s): 38e694c
Files changed (1) hide show
  1. app.py +21 -21
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
- 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.Text(placeholder="Enter a prompt in addition to the audio, image, text condition below", label="Prompt (Could be empty)"),
16
- "audio",
17
- "image",
18
- "text"
19
- ],
20
- outputs="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
 
 
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