import gradio as gr import time # ---------------- CONFIG ---------------- GET_KEY_URL = "https://adrinolinks.com/cTjV" # ---------------- LOGIC ---------------- def generate_video(prompt, key): time.sleep(1.2) # simulate processing if not prompt.strip() and not key.strip(): return None, "❌ Prompt can't be empty and API key is required." if not prompt.strip(): return None, "❌ Prompt can't be empty." if not key.strip(): return None, "❌ Please enter your API key." # Both filled → always invalid key return None, "❌ Invalid API Key. Please get a valid key to generate." # ---------------- UI ---------------- with gr.Blocks(css=""" body { background: linear-gradient(135deg, #0f0f0f, #1a1a1a); font-family: 'Segoe UI', sans-serif; color: white; } .glass { background: rgba(255,255,255,0.08); backdrop-filter: blur(14px); border-radius: 20px; padding: 25px; } button { border-radius: 14px !important; font-weight: bold; } .generate-btn { background: linear-gradient(90deg,#ff416c,#ff4b2b) !important; color: white !important; } .key-card { margin-top: 20px; padding: 20px; border-radius: 18px; background: linear-gradient(135deg, rgba(0,114,255,0.15), rgba(0,198,255,0.15)); border: 1px solid rgba(0,198,255,0.4); text-align: center; animation: floaty 3s ease-in-out infinite; } @keyframes floaty { 0% { transform: translateY(0px); } 50% { transform: translateY(-6px); } 100% { transform: translateY(0px); } } .key-btn-pro { width: 100%; height: 52px; font-size: 16px; font-weight: bold; border-radius: 14px; border: none; cursor: pointer; color: white; background: linear-gradient(90deg, #00c6ff, #0072ff, #00c6ff); background-size: 200% 200%; animation: glow 2.5s linear infinite; } @keyframes glow { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } } .key-btn-pro:hover { transform: scale(1.04); box-shadow: 0 0 25px rgba(0,198,255,0.8); } footer {display:none !important;} video {border-radius:16px;} """) as demo: # ---------------- HEADER ---------------- gr.Markdown("""
One‑click cinematic AI video generation (Demo Version)
🚧 Demo Space • No real API connected
Made with ❤️ by Prince