Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| # Pengaturan tema kustom agar terlihat futuristik dan canggih | |
| theme = gr.themes.Soft( | |
| primary_hue="purple", | |
| secondary_hue="indigo", | |
| neutral_hue="slate", | |
| ).set( | |
| body_background_fill="*neutral_950", # Latar belakang gelap keren | |
| block_background_fill="*neutral_900", | |
| block_border_width="1px", | |
| ) | |
| # Struktur Antarmuka MultiVibe AI | |
| with gr.Blocks(theme=theme, title="MultiVibe AI", css="footer {visibility: hidden}") as demo: | |
| # Header Website | |
| gr.Markdown( | |
| """ | |
| # π MultiVibe AI | |
| ### *The Ultimate All-in-One AI Studio (Text to Image, Video, & Audio)* | |
| """ | |
| ) | |
| # TAB 1: TEXT TO IMAGE | |
| with gr.Tab("πΌοΈ Text to Image (Up to 4K)"): | |
| gr.Markdown("### Generate High-Resolution Images") | |
| with gr.Row(): | |
| with gr.Column(): | |
| prompt_img = gr.Textbox(label="Masukkan Prompt Gambar", placeholder="Contoh: Astronaut riding a horse on Mars, cinematic, 4k resolution...") | |
| resolution_img = gr.Dropdown(choices=["1080p", "2K", "4K (Upscaled)"], value="1080p", label="Pilih Resolusi") | |
| generate_img_btn = gr.Button("Generate Image", variant="primary") | |
| with gr.Column(): | |
| output_image = gr.Image(label="Hasil Gambar") | |
| # TAB 2: TEXT TO VIDEO | |
| with gr.Tab("π¬ Text to Video (Long Duration)"): | |
| gr.Markdown("### Generate Cinematic Videos") | |
| with gr.Row(): | |
| with gr.Column(): | |
| prompt_vid = gr.Textbox(label="Masukkan Prompt Video", placeholder="Contoh: Cinematic drone shot of a futuristic cyberpunk city at night...") | |
| duration_vid = gr.Slider(minimum=5, maximum=600, value=10, step=5, label="Durasi Video (Detik)") | |
| resolution_vid = gr.Dropdown(choices=["720p", "1080p", "4K"], value="1080p", label="Pilih Resolusi Video") | |
| generate_vid_btn = gr.Button("Generate Video", variant="primary") | |
| with gr.Column(): | |
| output_video = gr.Video(label="Hasil Video") | |
| # TAB 3: TEXT TO AUDIO | |
| with gr.Tab("π΅ Text to Audio & Music"): | |
| gr.Markdown("### Generate AI Music & Sound Effects") | |
| with gr.Row(): | |
| with gr.Column(): | |
| prompt_aud = gr.Textbox(label="Masukkan Prompt Audio/Musik", placeholder="Contoh: Lo-fi hip hop beat for studying, calm synth, 80bpm...") | |
| duration_aud = gr.Slider(minimum=5, maximum=300, value=30, step=5, label="Durasi Audio (Detik)") | |
| generate_aud_btn = gr.Button("Generate Audio", variant="primary") | |
| with gr.Column(): | |
| output_audio = gr.Audio(label="Hasil Audio/Musik") | |
| # Cara mengganti Ikon (Favicon) Website MultiVibe AI: | |
| # Kamu cukup memasukkan file ikon bernama "favicon.png" di folder yang sama dengan kode ini, | |
| # lalu jalankan dengan perintah launch di bawah ini: | |
| demo.launch(favicon_path="favicon.png") |