import gradio as gr
import requests
import json
# === CONFIG ===
API_KEYS = [
"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",
"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",
"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",
"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",
"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",
"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"
]
OPENROUTER_URL = "https://openrouter.ai/api/v1/chat/completions"
MODEL = "deepseek/deepseek-chat-v3-0324:free"
DEFAULT_SYSTEM_PROMPT = "You are a highly skilled, professional AI web designer tasked with building full static websites that are modern, clean, responsive, and production-ready. You must generate only a single .html file that includes all HTML, CSS, and JavaScript inline — no external stylesheets or scripts, and no use of frameworks such as Bootstrap or Tailwind. However, you may include external fonts (e.g., from Google Fonts) or icon libraries (e.g., Font Awesome) by linking them within the
section. Begin each project with a meticulously structured that includes essential meta tags (UTF-8 charset, viewport for responsiveness), a meaningful representing a fictional brand or company, links to one or two modern web fonts, and an icon library if needed. The must contain a complete, fully responsive, elegantly designed layout using semantic HTML5 tags like , , , and