add gemini models
Browse files18 unmodified lines1920212223242520 unmodified lines46474849505130 unmodified lines82838485868735 unmodified lines12312412512612712818 unmodified lines## Features- **Multi-Model Support**: Choose from Moonshot Kimi-K2, DeepSeek V3, DeepSeek R1, ERNIE-4.5-VL, MiniMax M1, Qwen3-235B-A22B, Qwen3-30B-A3B-Instruct-2507, Qwen3-30B-A3B-Thinking-2507, SmolLM3-3B, and GLM-4.1V-9B-Thinking- **Flexible Input**: Describe your app in text, upload a UI design image (for multimodal models), provide a reference file (PDF, TXT, MD, CSV, DOCX, or image), or enter a website URL for redesign- **Web Search Integration**: Enable real-time web search (Tavily, with advanced search depth) to enhance code generation with up-to-date information and best practices- **Code Generation**: Generate code in HTML, Python, JS, and more. Special support for transformers.js apps (outputs index.html, index.js, style.css)20 unmodified linesexport TAVILY_API_KEY="your_tavily_api_key" # Optional, for web search featureexport DASHSCOPE_API_KEY="your_dashscope_api_key" # Required for Qwen3-30B models via DashScopeexport POE_API_KEY="your_poe_api_key" # Required for GPT-5 and Grok-4 via Poe```## Usage30 unmodified lines- GLM-4.1V-9B-Thinking (multimodal)- GPT-5 (via Poe)- Grok-4 (via Poe)## Input Options35 unmodified lines- `HF_TOKEN`: Your Hugging Face API token (required)- `TAVILY_API_KEY`: Your Tavily API key (optional, for web search)## Project Structure18 unmodified lines1920212223242520 unmodified lines4647484950515230 unmodified lines838485868788899035 unmodified lines12612712812913013113218 unmodified lines## Features- **Multi-Model Support**: Choose from Moonshot Kimi-K2, DeepSeek V3, DeepSeek R1, ERNIE-4.5-VL, MiniMax M1, Qwen3-235B-A22B, Qwen3-30B-A3B-Instruct-2507, Qwen3-30B-A3B-Thinking-2507, SmolLM3-3B, GLM-4.1V-9B-Thinking, Gemini 2.5 Flash and Gemini 2.5 Pro (OpenAI-compatible)- **Flexible Input**: Describe your app in text, upload a UI design image (for multimodal models), provide a reference file (PDF, TXT, MD, CSV, DOCX, or image), or enter a website URL for redesign- **Web Search Integration**: Enable real-time web search (Tavily, with advanced search depth) to enhance code generation with up-to-date information and best practices- **Code Generation**: Generate code in HTML, Python, JS, and more. Special support for transformers.js apps (outputs index.html, index.js, style.css)20 unmodified linesexport TAVILY_API_KEY="your_tavily_api_key" # Optional, for web search featureexport DASHSCOPE_API_KEY="your_dashscope_api_key" # Required for Qwen3-30B models via DashScopeexport POE_API_KEY="your_poe_api_key" # Required for GPT-5 and Grok-4 via Poeexport GEMINI_API_KEY="your_gemini_api_key" # Required for Gemini models```## Usage30 unmodified lines- GLM-4.1V-9B-Thinking (multimodal)- GPT-5 (via Poe)- Grok-4 (via Poe)- Gemini 2.5 Flash (OpenAI-compatible)- Gemini 2.5 Pro (OpenAI-compatible)## Input Options35 unmodified lines- `HF_TOKEN`: Your Hugging Face API token (required)- `TAVILY_API_KEY`: Your Tavily API key (optional, for web search)- `GEMINI_API_KEY`: Your Google Gemini API key (required to use Gemini models)## Project Structure
511 unmodified lines512513514515516517135 unmodified lines653654655656657658511 unmodified lines"id": "codestral-2508","description": "Mistral Codestral model - specialized for code generation and programming tasks"},{"name": "GPT-OSS-120B","id": "openai/gpt-oss-120b",135 unmodified lineselif model_id == "codestral-2508":# Use Mistral client for Codestral modelreturn Mistral(api_key=os.getenv("MISTRAL_API_KEY"))elif model_id == "openai/gpt-oss-120b":provider = "cerebras"elif model_id == "openai/gpt-oss-20b":511 unmodified lines512513514515516517518519520521522523524525526527135 unmodified lines663664665666667668669670671672673674675676677678679680511 unmodified lines"id": "codestral-2508","description": "Mistral Codestral model - specialized for code generation and programming tasks"},{"name": "Gemini 2.5 Flash","id": "gemini-2.5-flash","description": "Google Gemini 2.5 Flash via OpenAI-compatible API"},{"name": "Gemini 2.5 Pro","id": "gemini-2.5-pro","description": "Google Gemini 2.5 Pro via OpenAI-compatible API"},{"name": "GPT-OSS-120B","id": "openai/gpt-oss-120b",135 unmodified lineselif model_id == "codestral-2508":# Use Mistral client for Codestral modelreturn Mistral(api_key=os.getenv("MISTRAL_API_KEY"))elif model_id == "gemini-2.5-flash":# Use Google Gemini (OpenAI-compatible) clientreturn OpenAI(api_key=os.getenv("GEMINI_API_KEY"),base_url="https://generativelanguage.googleapis.com/v1beta/openai/",)elif model_id == "gemini-2.5-pro":# Use Google Gemini Pro (OpenAI-compatible) clientreturn OpenAI(api_key=os.getenv("GEMINI_API_KEY"),base_url="https://generativelanguage.googleapis.com/v1beta/openai/",)elif model_id == "openai/gpt-oss-120b":provider = "cerebras"elif model_id == "openai/gpt-oss-20b":
README.md+5-1
app.py+22