Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
#
|
| 4 |
image_client = gr.load("models/black-forest-labs/FLUX.1-schnell")
|
| 5 |
voice_client = gr.load("models/suno/bark")
|
| 6 |
|
|
@@ -17,16 +17,17 @@ with gr.Blocks() as app:
|
|
| 17 |
img_btn = gr.Button("Paint Image", variant="primary")
|
| 18 |
img_output = gr.Image(label="Output Image")
|
| 19 |
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
-
# 🎬 2. VIDEO TAB
|
| 23 |
with gr.TabItem("🎬 Video Generator (3D VFX)"):
|
| 24 |
gr.Markdown("#### Text-to-Video Engine (King AI Style)")
|
| 25 |
vid_prompt = gr.Textbox(label="Describe the Action Scene", placeholder="Iron man flying through a burning city...")
|
| 26 |
vid_btn = gr.Button("Render VFX Video", variant="primary")
|
| 27 |
|
| 28 |
-
#
|
| 29 |
-
gr.HTML('<iframe src="https://hf.space" frameborder="0" width="100%" height="
|
| 30 |
|
| 31 |
# 🗣️ 3. VOICE TAB
|
| 32 |
with gr.TabItem("🗣️ Character Voice"):
|
|
@@ -35,7 +36,8 @@ with gr.Blocks() as app:
|
|
| 35 |
voice_btn = gr.Button("Generate Voice", variant="primary")
|
| 36 |
voice_output = gr.Audio(label="Output Audio Sync")
|
| 37 |
|
| 38 |
-
|
|
|
|
| 39 |
|
| 40 |
# Launch
|
| 41 |
app.launch(theme=gr.themes.Soft(primary_hue="cyan", neutral_hue="slate"))
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
# Variable names fixed completely
|
| 4 |
image_client = gr.load("models/black-forest-labs/FLUX.1-schnell")
|
| 5 |
voice_client = gr.load("models/suno/bark")
|
| 6 |
|
|
|
|
| 17 |
img_btn = gr.Button("Paint Image", variant="primary")
|
| 18 |
img_output = gr.Image(label="Output Image")
|
| 19 |
|
| 20 |
+
# Name fixed to image_client
|
| 21 |
+
img_btn.click(fn=image_client, inputs=img_prompt, outputs=img_output)
|
| 22 |
|
| 23 |
+
# 🎬 2. VIDEO TAB
|
| 24 |
with gr.TabItem("🎬 Video Generator (3D VFX)"):
|
| 25 |
gr.Markdown("#### Text-to-Video Engine (King AI Style)")
|
| 26 |
vid_prompt = gr.Textbox(label="Describe the Action Scene", placeholder="Iron man flying through a burning city...")
|
| 27 |
vid_btn = gr.Button("Render VFX Video", variant="primary")
|
| 28 |
|
| 29 |
+
# Embedded safe iframe for seamless 3D video generation
|
| 30 |
+
gr.HTML('<iframe src="https://hf.space" frameborder="0" width="100%" height="600px"></iframe>')
|
| 31 |
|
| 32 |
# 🗣️ 3. VOICE TAB
|
| 33 |
with gr.TabItem("🗣️ Character Voice"):
|
|
|
|
| 36 |
voice_btn = gr.Button("Generate Voice", variant="primary")
|
| 37 |
voice_output = gr.Audio(label="Output Audio Sync")
|
| 38 |
|
| 39 |
+
# Name fixed to voice_client
|
| 40 |
+
voice_btn.click(fn=voice_client, inputs=voice_text, outputs=voice_output)
|
| 41 |
|
| 42 |
# Launch
|
| 43 |
app.launch(theme=gr.themes.Soft(primary_hue="cyan", neutral_hue="slate"))
|