Delete app.py
Browse files
app.py
DELETED
|
@@ -1,42 +0,0 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
|
| 3 |
-
# Layout structure taiyar kiya
|
| 4 |
-
with gr.Blocks(theme=gr.themes.Soft(primary_hue="cyan", neutral_hue="slate")) as app:
|
| 5 |
-
gr.Markdown("# 👑 King VFX AI Studio")
|
| 6 |
-
gr.Markdown("### Create Cinematic 2D/3D Videos & Voices Free on Mobile")
|
| 7 |
-
|
| 8 |
-
with gr.Tabs():
|
| 9 |
-
# 1. IMAGE TAB
|
| 10 |
-
with gr.TabItem("🖼️ Image"):
|
| 11 |
-
gr.Markdown("### AI Image Generator")
|
| 12 |
-
img_prompt = gr.Textbox(label="Describe your image", placeholder="A futuristic cyberpunk warrior sitting on a throne...")
|
| 13 |
-
img_btn = gr.Button("Generate Image", variant="primary")
|
| 14 |
-
img_output = gr.Image(label="Your Rendered Image")
|
| 15 |
-
|
| 16 |
-
# Fixed connection logic (fn=lambda)
|
| 17 |
-
img_btn.click(fn=lambda x: x, inputs=img_prompt, outputs=img_output, api_name="predict", src="black-forest-labs/FLUX.1-schnell")
|
| 18 |
-
|
| 19 |
-
# 2. VIDEO TAB
|
| 20 |
-
with gr.TabItem("🎬 Video (2D/3D VFX)"):
|
| 21 |
-
gr.Markdown("### Advanced Text-to-Video Generator")
|
| 22 |
-
vid_style = gr.Dropdown(["3D Cinematic VFX", "2D Animation Style", "Ultra Realistic"], label="Select Video Style")
|
| 23 |
-
vid_prompt = gr.Textbox(label="Describe the action/scene", placeholder="Iron man flying through a burning city, cinematic lighting...")
|
| 24 |
-
vid_btn = gr.Button("Generate VFX Video", variant="primary")
|
| 25 |
-
vid_output = gr.Video(label="Your AI Video Render")
|
| 26 |
-
|
| 27 |
-
# Fixed connection logic
|
| 28 |
-
vid_btn.click(fn=lambda x: x, inputs=vid_prompt, outputs=vid_output, api_name="predict", src="THUDM/CogVideoX-5b")
|
| 29 |
-
|
| 30 |
-
# 3. VOICE TAB
|
| 31 |
-
with gr.TabItem("🗣️ Character Voice"):
|
| 32 |
-
gr.Markdown("### Character Voice Generator")
|
| 33 |
-
voice_style = gr.Dropdown(["Deep Heroic Male", "Animated Female Voice", "Scary VFX Monster"], label="Select Character Voice")
|
| 34 |
-
voice_text = gr.Textbox(label="Type Dialogue", placeholder="Type the words your character will say...")
|
| 35 |
-
voice_btn = gr.Button("Generate Voice", variant="primary")
|
| 36 |
-
voice_output = gr.Audio(label="Rendered Character Audio")
|
| 37 |
-
|
| 38 |
-
# Fixed connection logic
|
| 39 |
-
voice_btn.click(fn=lambda x: x, inputs=voice_text, outputs=voice_output, api_name="predict", src="suno/bark")
|
| 40 |
-
|
| 41 |
-
# App Launch
|
| 42 |
-
app.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|