import gradio as gr from huggingface_hub import InferenceClient # Client setup client = InferenceClient("stabilityai/stable-video-diffusion-img2vid-xt") def animate(image_path): if not image_path: return None try: # SVD model ke liye seedha video generation function # Hum yahan 'client.image_to_video' ka use kar rahe hain video = client.image_to_video(image_path) return video except Exception as e: print(f"Error: {e}") return None with gr.Blocks(theme=gr.themes.Soft()) as demo: gr.Markdown("# ๐ Nexora AI - Stable Version") img_in = gr.Image(label="Upload Image", type="filepath") btn = gr.Button("Start Animation", variant="primary") vid_out = gr.Video(label="Nexora Result") # Process start btn.click(animate, inputs=img_in, outputs=vid_out) demo.launch()