File size: 1,011 Bytes
4eca347
 
 
509113e
4eca347
 
509113e
4eca347
 
509113e
4eca347
 
74273c0
 
 
 
 
 
 
 
 
 
 
 
 
509113e
 
 
74273c0
509113e
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import gradio as gr

def text_to_image(prompt):
    return f"🖼️ Image generated for: {prompt}"

def text_to_video(prompt):
    return f"🎥 Video generated for: {prompt}"

def text_to_song(prompt):
    return f"🎵 Song generated for: {prompt}"

with gr.Blocks() as demo:
    with gr.Row():
        with gr.Column():
            text_input = gr.Textbox(label="Enter your prompt")

            btn_img = gr.Button("Generate Image")
            btn_vid = gr.Button("Generate Video")
            btn_song = gr.Button("Generate Song")

        with gr.Column():
            output_img = gr.Textbox(label="Image Output")
            output_vid = gr.Textbox(label="Video Output")
            output_song = gr.Textbox(label="Song Output")

    btn_img.click(fn=text_to_image, inputs=text_input, outputs=output_img)
    btn_vid.click(fn=text_to_video, inputs=text_input, outputs=output_vid)
    btn_song.click(fn=text_to_song, inputs=text_input, outputs=output_song)

if __name__ == "__main__":
    demo.launch()