Spaces:
Paused
Paused
File size: 1,397 Bytes
c799c89 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | """
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;
}
""" |