KingAI / app.py
wasim7's picture
Update app.py
a1349f2 verified
Raw
History Blame Contribute Delete
1.95 kB
import gradio as gr
# Models load kiye
image_client = gr.load("models/black-forest-labs/FLUX.1-schnell")
voice_client = gr.load("models/suno/bark")
# Layout Block (Theme ko sahi jagah par set kar diya)
with gr.Blocks(theme=gr.themes.Soft(primary_hue="cyan", neutral_hue="slate")) as app:
gr.Markdown("# ๐Ÿ‘‘ Nova Studio - King VFX AI")
gr.Markdown("### Create Cinematic Images, Videos & Voices Free on Mobile")
with gr.Tabs():
# ๐Ÿ–ผ๏ธ 1. IMAGE TAB
with gr.TabItem("๐Ÿ–ผ๏ธ Image Generator"):
gr.Markdown("#### Generate Ultra-Realistic Photos")
img_prompt = gr.Textbox(label="Enter Prompt", placeholder="A cute fluffy cat wearing sunglasses...")
img_btn = gr.Button("Paint Image", variant="primary")
img_output = gr.Image(label="Output Image")
img_btn.click(fn=image_client, inputs=img_prompt, outputs=img_output)
# ๐ŸŽฌ 2. VIDEO TAB
with gr.TabItem("๐ŸŽฌ Video Generator (3D VFX)"):
gr.Markdown("#### Text-to-Video Engine (King AI Style)")
vid_prompt = gr.Textbox(label="Describe the Action Scene", placeholder="Iron man flying through a burning city...")
vid_btn = gr.Button("Render VFX Video", variant="primary")
# Safe embedded player
gr.HTML('<iframe src="https://hf.space" frameborder="0" width="100%" height="600px"></iframe>')
# ๐Ÿ—ฃ๏ธ 3. VOICE TAB
with gr.TabItem("๐Ÿ—ฃ๏ธ Character Voice"):
gr.Markdown("#### Dynamic Voice Dialogue Generator")
voice_text = gr.Textbox(label="Type Character Dialogue", placeholder="Type what your character should say...")
voice_btn = gr.Button("Generate Voice", variant="primary")
voice_output = gr.Audio(label="Output Audio Sync")
voice_btn.click(fn=voice_client, inputs=voice_text, outputs=voice_output)