app-jmbbwx-74 / config.py
AiCoderv2's picture
Deploy Gradio app with multiple files
629446c verified
# Configuration file for AI Website Builder
# Supported file types
SUPPORTED_FILES = [
'html', 'css', 'js', 'json', 'md', 'txt', 'xml', 'yaml', 'yml',
'jsx', 'tsx', 'ts', 'vue', 'svelte', 'py', 'php', 'rb', 'go',
'java', 'c', 'cpp', 'h', 'hpp', 'scss', 'sass', 'less',
'sql', 'sh', 'bat', 'ps1', 'dockerfile', 'gitignore',
'env', 'ini', 'cfg', 'conf', 'log', 'csv', 'svg', 'png',
'jpg', 'jpeg', 'gif', 'ico', 'pdf', 'doc', 'docx', 'xls',
'xlsx', 'ppt', 'pptx', 'zip', 'rar', 'tar', 'gz'
]
# Default prompt for new users
DEFAULT_PROMPT = """Create a modern portfolio website with:
- Hero section with animated text
- Project gallery with filter functionality
- About section with skills
- Contact form with validation
- Smooth scrolling navigation
- Dark/light mode toggle
- Responsive design for all devices
- Modern animations and transitions"""
# Website templates
WEBSITE_TEMPLATES = {
"portfolio": {
"name": "Portfolio Website",
"description": "Perfect for showcasing your work and skills",
"features": ["gallery", "about", "contact", "skills"]
},
"business": {
"name": "Business Website",
"description": "Professional website for your business",
"features": ["services", "about", "testimonials", "contact"]
},
"blog": {
"name": "Blog Website",
"description": "Clean and modern blog design",
"features": ["posts", "categories", "search", "comments"]
},
"ecommerce": {
"name": "E-commerce Store",
"description": "Online store with product catalog",
"features": ["products", "cart", "checkout", "search"]
},
"landing": {
"name": "Landing Page",
"description": "High-converting landing page",
"features": ["hero", "features", "testimonials", "cta"]
}
}
# Color schemes
COLOR_SCHEMES = {
"blue": {
"primary": "#3498db",
"secondary": "#2980b9",
"accent": "#e74c3c"
},
"red": {
"primary": "#e74c3c",
"secondary": "#c0392b",
"accent": "#f39c12"
},
"green": {
"primary": "#27ae60",
"secondary": "#229954",
"accent": "#f39c12"
},
"purple": {
"primary": "#9b59b6",
"secondary": "#8e44ad",
"accent": "#e74c3c"
},
"orange": {
"primary": "#f39c12",
"secondary": "#e67e22",
"accent": "#3498db"
},
"dark": {
"primary": "#34495e",
"secondary": "#2c3e50",
"accent": "#3498db"
}
}
# Framework options
FRAMEWORKS = {
"vanilla": {
"name": "Vanilla HTML/CSS/JS",
"description": "Pure web technologies, no frameworks"
},
"bootstrap": {
"name": "Bootstrap",
"description": "Popular CSS framework for responsive design"
},
"tailwind": {
"name": "Tailwind CSS",
"description": "Utility-first CSS framework"
},
"react": {
"name": "React",
"description": "JavaScript library for building user interfaces"
},
"vue": {
"name": "Vue.js",
"description": "Progressive JavaScript framework"
}
}
# Server configuration
SERVER_CONFIG = {
"host": "0.0.0.0",
"port": 7860,
"debug": True,
"share": True
}
# File size limits (in bytes)
MAX_FILE_SIZE = 10 * 1024 * 1024 # 10MB
MAX_ZIP_SIZE = 50 * 1024 * 1024 # 50MB
# Preview server settings
PREVIEW_CONFIG = {
"port_range": (8000, 9000),
"timeout": 30,
"auto_refresh": True
}
# AI model settings
AI_CONFIG = {
"model": "qwen2.5-72b-instruct",
"temperature": 0.7,
"max_tokens": 4000,
"timeout": 60
}