Spaces:
Sleeping
Sleeping
add new qwen model
Browse filesFiles changed (5)
99 unmodified lines10010110210310410510692 unmodified lines19920020120220320420599 unmodified lines# Define models and languages here to avoid importing Gradio UIAVAILABLE_MODELS = [{"name": "MiniMax-M2.5 🤖", "id": "MiniMaxAI/MiniMax-M2.5", "description": "MiniMax-M2.5 - Latest powerful coder model via HuggingFace Router with fastest provider (Default)", "supports_images": False},{"name": "GLM-5 🧠", "id": "zai-org/GLM-5", "description": "GLM-5 - New powerful reasoning model via HuggingFace Router", "supports_images": False},{"name": "Qwen3-Coder-Next 🤖", "id": "Qwen/Qwen3-Coder-Next", "description": "Qwen3-Coder-Next - Latest powerful coder model via HuggingFace Router with Novita provider", "supports_images": False},{"name": "Kimi-K2.5 🧠", "id": "moonshotai/Kimi-K2.5", "description": "Kimi-K2.5 - New powerful reasoning model via HuggingFace Router with Novita provider", "supports_images": True},92 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "MiniMaxAI/MiniMax-M2.5"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False99 unmodified lines10010110210310410510610792 unmodified lines20020120220320420520699 unmodified lines# Define models and languages here to avoid importing Gradio UIAVAILABLE_MODELS = [{"name": "Qwen3.5-397B 🤖", "id": "Qwen/Qwen3.5-397B-A17B", "description": "Qwen3.5-397B-A17B - Latest powerful model via HuggingFace Router (Default)", "supports_images": True},{"name": "MiniMax-M2.5 🤖", "id": "MiniMaxAI/MiniMax-M2.5", "description": "MiniMax-M2.5 - Latest powerful coder model via HuggingFace Router with fastest provider", "supports_images": False},{"name": "GLM-5 🧠", "id": "zai-org/GLM-5", "description": "GLM-5 - New powerful reasoning model via HuggingFace Router", "supports_images": False},{"name": "Qwen3-Coder-Next 🤖", "id": "Qwen/Qwen3-Coder-Next", "description": "Qwen3-Coder-Next - Latest powerful coder model via HuggingFace Router with Novita provider", "supports_images": False},{"name": "Kimi-K2.5 🧠", "id": "moonshotai/Kimi-K2.5", "description": "Kimi-K2.5 - New powerful reasoning model via HuggingFace Router with Novita provider", "supports_images": True},92 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "Qwen/Qwen3.5-397B-A17B"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False
68 unmodified lines69707172737452 unmodified lines12712812913013113268 unmodified linesdefault_headers={"X-HF-Bill-To": "huggingface"})else:# Unknown model - try HuggingFace Inference APIreturn OpenAI(52 unmodified lines# Qwen3-Coder-Next needs Novita providerreturn "Qwen/Qwen3-Coder-Next:novita"return model_id68 unmodified lines697071727374757677787980818252 unmodified lines13513613713813914014114214314468 unmodified linesdefault_headers={"X-HF-Bill-To": "huggingface"})elif model_id.startswith("Qwen/Qwen3.5"):# Qwen 3.5 models via HuggingFace Routerreturn OpenAI(base_url="https://router.huggingface.co/v1",api_key=os.getenv("HF_TOKEN"),default_headers={"X-HF-Bill-To": "huggingface"})else:# Unknown model - try HuggingFace Inference APIreturn OpenAI(52 unmodified lines# Qwen3-Coder-Next needs Novita providerreturn "Qwen/Qwen3-Coder-Next:novita"elif model_id == "Qwen/Qwen3.5-397B-A17B":# Qwen3.5-397B-A17B needs fastest providerreturn "Qwen/Qwen3.5-397B-A17B:fastest"return model_id
16 unmodified lines1718192021222316 unmodified linesconst [generatedCode, setGeneratedCode] = useState('');const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');const [selectedModel, setSelectedModel] = useState('MiniMaxAI/MiniMax-M2.5');const [models, setModels] = useState<Model[]>([]);const [isGenerating, setIsGenerating] = useState(false);const [isAuthenticated, setIsAuthenticated] = useState(false);16 unmodified lines1718192021222316 unmodified linesconst [generatedCode, setGeneratedCode] = useState('');const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');const [selectedModel, setSelectedModel] = useState('Qwen/Qwen3.5-397B-A17B');const [models, setModels] = useState<Model[]>([]);const [isGenerating, setIsGenerating] = useState(false);const [isAuthenticated, setIsAuthenticated] = useState(false);
196 unmodified lines197198199200201202203196 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-sm text-[#f5f5f7]">{model.name}</span>{['MiniMaxAI/MiniMax-M2.5'].includes(model.id) && (<span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase flex-shrink-0">NEW</span>196 unmodified lines197198199200201202203196 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-sm text-[#f5f5f7]">{model.name}</span>{['Qwen/Qwen3.5-397B-A17B', 'MiniMaxAI/MiniMax-M2.5'].includes(model.id) && (<span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase flex-shrink-0">NEW</span>
30 unmodified lines31323334353637476 unmodified lines51451551651751851952052137 unmodified lines55956056156256356456556630 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'MiniMaxAI/MiniMax-M2.5',onAuthChange,setPendingPR,pendingPRRef476 unmodified linesif (onStart) {// Pass duplicated space ID so auto-deploy updates itconsole.log('[Redesign] Calling onStart with duplicated repo ID:', duplicatedRepoId);console.log('[Redesign] Using MiniMaxAI/MiniMax-M2.5 for redesign');onStart(redesignPrompt, result.language || 'html', 'MiniMaxAI/MiniMax-M2.5', undefined, duplicatedRepoId);}}, 100);37 unmodified linesif (onStart) {console.log('[Redesign] Will create PR - not passing repo ID');console.log('[Redesign] Using MiniMaxAI/MiniMax-M2.5 for redesign');onStart(redesignPrompt, result.language || 'html', 'MiniMaxAI/MiniMax-M2.5', undefined, repoId, true); // Pass true for shouldCreatePR}console.log('[Redesign] Will create PR after code generation completes');30 unmodified lines31323334353637476 unmodified lines51451551651751851952052137 unmodified lines55956056156256356456556630 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'Qwen/Qwen3.5-397B-A17B',onAuthChange,setPendingPR,pendingPRRef476 unmodified linesif (onStart) {// Pass duplicated space ID so auto-deploy updates itconsole.log('[Redesign] Calling onStart with duplicated repo ID:', duplicatedRepoId);console.log('[Redesign] Using Qwen/Qwen3.5-397B-A17B for redesign');onStart(redesignPrompt, result.language || 'html', 'Qwen/Qwen3.5-397B-A17B', undefined, duplicatedRepoId);}}, 100);37 unmodified linesif (onStart) {console.log('[Redesign] Will create PR - not passing repo ID');console.log('[Redesign] Using Qwen/Qwen3.5-397B-A17B for redesign');onStart(redesignPrompt, result.language || 'html', 'Qwen/Qwen3.5-397B-A17B', undefined, repoId, true); // Pass true for shouldCreatePR}console.log('[Redesign] Will create PR after code generation completes');
backend_api.py+3-2
backend_models.py+12
frontend/src/app/page.tsx+1-1
frontend/src/components/ControlPanel.tsx+1-1
frontend/src/components/LandingPage.tsx+5-5