Spaces:
Running
Running
Commit ·
0b28d63
1
Parent(s): 053e290
Build Wan 2.2 text-to-video Gradio app
Browse filesSwitch from TI2V-5B to T2V-14B model, add themed UI with header,
sidebar with model info, and example prompts table.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
title: WanTwoPointTwo
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
|
@@ -8,10 +8,8 @@ sdk_version: 6.6.0
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
-
short_description:
|
| 12 |
hf_oauth: true
|
| 13 |
hf_oauth_scopes:
|
| 14 |
- inference-api
|
| 15 |
---
|
| 16 |
-
|
| 17 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
title: WanTwoPointTwo
|
| 3 |
+
emoji: 🎬
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
+
short_description: Wan 2.2 Text-to-Video Generator
|
| 12 |
hf_oauth: true
|
| 13 |
hf_oauth_scopes:
|
| 14 |
- inference-api
|
| 15 |
---
|
|
|
|
|
|
app.py
CHANGED
|
@@ -1,10 +1,50 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
with gr.Sidebar():
|
| 5 |
-
gr.Markdown("#
|
| 6 |
-
gr.Markdown(
|
|
|
|
|
|
|
|
|
|
| 7 |
button = gr.LoginButton("Sign in")
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
HEADER = """
|
| 4 |
+
# Wan 2.2 — Text to Video Generator
|
| 5 |
+
|
| 6 |
+
Generate videos from text prompts using **Wan-AI/Wan2.2-T2V-14B**.
|
| 7 |
+
Powered by the **fal-ai** inference provider. Sign in with your Hugging Face account to get started.
|
| 8 |
+
"""
|
| 9 |
+
|
| 10 |
+
EXAMPLES = [
|
| 11 |
+
"A golden retriever running through a sunlit meadow in slow motion, cinematic lighting",
|
| 12 |
+
"A futuristic city at night with flying cars and neon lights reflecting off wet streets",
|
| 13 |
+
"An astronaut floating in space with Earth in the background, gentle camera rotation",
|
| 14 |
+
"Ocean waves crashing on a rocky coastline at sunset, dramatic sky with orange and purple clouds",
|
| 15 |
+
"A steaming cup of coffee on a wooden table with rain falling outside the window",
|
| 16 |
+
]
|
| 17 |
+
|
| 18 |
+
with gr.Blocks(
|
| 19 |
+
fill_height=True,
|
| 20 |
+
theme=gr.themes.Soft(primary_hue="indigo", secondary_hue="purple"),
|
| 21 |
+
title="Wan 2.2 Text-to-Video",
|
| 22 |
+
) as demo:
|
| 23 |
+
|
| 24 |
with gr.Sidebar():
|
| 25 |
+
gr.Markdown("## Account")
|
| 26 |
+
gr.Markdown(
|
| 27 |
+
"This Space uses the **fal-ai** inference API. "
|
| 28 |
+
"Sign in with your Hugging Face account to use it."
|
| 29 |
+
)
|
| 30 |
button = gr.LoginButton("Sign in")
|
| 31 |
+
gr.Markdown("---")
|
| 32 |
+
gr.Markdown(
|
| 33 |
+
"**Model:** [Wan-AI/Wan2.2-T2V-14B](https://huggingface.co/Wan-AI/Wan2.2-T2V-14B)\n\n"
|
| 34 |
+
"**Provider:** fal-ai"
|
| 35 |
+
)
|
| 36 |
+
|
| 37 |
+
gr.Markdown(HEADER)
|
| 38 |
+
gr.load(
|
| 39 |
+
"models/Wan-AI/Wan2.2-T2V-14B",
|
| 40 |
+
accept_token=button,
|
| 41 |
+
provider="fal-ai",
|
| 42 |
+
)
|
| 43 |
+
gr.Markdown("### Example Prompts")
|
| 44 |
+
gr.Dataframe(
|
| 45 |
+
value=[[e] for e in EXAMPLES],
|
| 46 |
+
headers=["Prompt idea — copy and paste above"],
|
| 47 |
+
interactive=False,
|
| 48 |
+
)
|
| 49 |
+
|
| 50 |
+
demo.launch()
|