import gradio as gr with gr.Blocks(fill_height=True) as demo: with gr.Sidebar(): gr.Markdown("# Inference Provider") gr.Markdown("This Space showcases the Wan-AI/Wan2.1-T2V-1.3B model, served by the fal-ai API. Sign in with your Hugging Face account to use this API.") button = gr.LoginButton("Sign in") gr.Markdown("## 🎬 Generate Video from Text") with gr.Row(): with gr.Column(): text_input = gr.Textbox(label="Prompt", placeholder="Enter your prompt to generate video...") generate_button = gr.Button("Generate Video") with gr.Column(): video_output = gr.Video(label="Generated Video") model = gr.load( "models/Wan-AI/Wan2.1-T2V-1.3B", inputs=text_input, outputs=video_output, accept_token=button, provider="fal-ai" ) generate_button.click(fn=model, inputs=text_input, outputs=video_output) demo.launch()