File size: 798 Bytes
c77d7d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr
from transformers import pipeline

# Pipelines: ajuste aqui para modelos gratuitos disponíveis no HF
txt2img = pipeline("text-to-image", model="stabilityai/stable-diffusion-3")
txt2speech = pipeline("text-to-speech", model="suno-ai/bark")
# Pode adicionar txt2video, txt2txt, txt2music, etc

def multimodal_boost(input_text):
    # Gera imagem e áudio ao mesmo tempo
    img = txt2img(input_text)[0]
    aud = txt2speech(input_text)[0]
    return img, (aud["audio"], "audio/wav")

# Interface Gradio: pode adicionar microfone, output de vídeo, etc
iface = gr.Interface(
    multimodal_boost,
    gr.Textbox(label="Digite ou fale"),
    outputs=["image", "audio"],
    live=True, 
    description="Boost Multimodal HF: Texto para Imagem e Áudio, tudo livre!"
)
iface.launch()