Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 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 |
|
| 7 |
-
# Layout Block
|
| 8 |
-
with gr.Blocks() as app:
|
| 9 |
gr.Markdown("# 👑 Nova Studio - King VFX AI")
|
| 10 |
gr.Markdown("### Create Cinematic Images, Videos & Voices Free on Mobile")
|
| 11 |
|
|
@@ -17,7 +17,6 @@ with gr.Blocks() as app:
|
|
| 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
|
|
@@ -26,7 +25,7 @@ with gr.Blocks() as app:
|
|
| 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 |
-
#
|
| 30 |
gr.HTML('<iframe src="https://hf.space" frameborder="0" width="100%" height="600px"></iframe>')
|
| 31 |
|
| 32 |
# 🗣️ 3. VOICE TAB
|
|
@@ -36,8 +35,4 @@ with gr.Blocks() as app:
|
|
| 36 |
voice_btn = gr.Button("Generate Voice", variant="primary")
|
| 37 |
voice_output = gr.Audio(label="Output Audio Sync")
|
| 38 |
|
| 39 |
-
|
| 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"))
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
# Models load kiye
|
| 4 |
image_client = gr.load("models/black-forest-labs/FLUX.1-schnell")
|
| 5 |
voice_client = gr.load("models/suno/bark")
|
| 6 |
|
| 7 |
+
# Layout Block (Theme ko sahi jagah par set kar diya)
|
| 8 |
+
with gr.Blocks(theme=gr.themes.Soft(primary_hue="cyan", neutral_hue="slate")) as app:
|
| 9 |
gr.Markdown("# 👑 Nova Studio - King VFX AI")
|
| 10 |
gr.Markdown("### Create Cinematic Images, Videos & Voices Free on Mobile")
|
| 11 |
|
|
|
|
| 17 |
img_btn = gr.Button("Paint Image", variant="primary")
|
| 18 |
img_output = gr.Image(label="Output Image")
|
| 19 |
|
|
|
|
| 20 |
img_btn.click(fn=image_client, inputs=img_prompt, outputs=img_output)
|
| 21 |
|
| 22 |
# 🎬 2. VIDEO TAB
|
|
|
|
| 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 |
+
# Safe embedded player
|
| 29 |
gr.HTML('<iframe src="https://hf.space" frameborder="0" width="100%" height="600px"></iframe>')
|
| 30 |
|
| 31 |
# 🗣️ 3. VOICE TAB
|
|
|
|
| 35 |
voice_btn = gr.Button("Generate Voice", variant="primary")
|
| 36 |
voice_output = gr.Audio(label="Output Audio Sync")
|
| 37 |
|
| 38 |
+
voice_btn.click(fn=voice_client, inputs=voice_text, outputs=voice_output)
|
|
|
|
|
|
|
|
|
|
|
|