Spaces:
Sleeping
Sleeping
| """ | |
| Configuration settings for MCP Browser | |
| """ | |
| import os | |
| # Browser settings | |
| CHROMIUM_PATHS = [ | |
| "/usr/bin/chromium", | |
| "/usr/bin/chromium-browser", | |
| "/usr/bin/google-chrome", | |
| "/usr/bin/google-chrome-stable" | |
| ] | |
| CHROME_OPTIONS = [ | |
| "--headless", | |
| "--no-sandbox", | |
| "--disable-dev-shm-usage", | |
| "--disable-gpu", | |
| "--disable-web-security", | |
| "--disable-features=VizDisplayCompositor", | |
| "--disable-setuid-sandbox", | |
| "--memory-pressure-off", | |
| "--max_old_space_size=4096", | |
| "--disable-background-timer-throttling", | |
| "--disable-renderer-backgrounding", | |
| "--disable-features=TranslateUI", | |
| "--disable-ipc-flooding-protection", | |
| "--window-size=1920,1080", | |
| "--enable-automation", | |
| "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", | |
| "--enable-logging", | |
| "--v=1" | |
| ] | |
| # Timeouts | |
| DEFAULT_PAGE_LOAD_TIMEOUT = 30 | |
| DEFAULT_IMPLICIT_WAIT = 10 | |
| DEFAULT_EXPLICIT_WAIT = 10 | |
| # API Keys | |
| GEMINI_API_KEY = os.getenv("GEMINI_API_KEY") | |
| # Request history limit | |
| MAX_REQUEST_HISTORY = 50 | |
| # File paths | |
| TEMP_DIR = "/tmp" | |
| # CSS Styling | |
| UI_CSS = """ | |
| .gradio-container { | |
| max-width: 100% !important; | |
| } | |
| .main-container { | |
| display: flex; | |
| gap: 20px; | |
| } | |
| .sidebar { | |
| min-width: 350px; | |
| max-width: 400px; | |
| } | |
| .main-content { | |
| flex: 1; | |
| } | |
| .chat-container { | |
| height: 600px; | |
| } | |
| """ |