diamond-in commited on
Commit
c799c89
·
verified ·
1 Parent(s): c2a0f3c

Update config/settings.py

Browse files
Files changed (1) hide show
  1. config/settings.py +68 -0
config/settings.py CHANGED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Configuration settings for MCP Browser
3
+ """
4
+ import os
5
+
6
+ # Browser settings
7
+ CHROMIUM_PATHS = [
8
+ "/usr/bin/chromium",
9
+ "/usr/bin/chromium-browser",
10
+ "/usr/bin/google-chrome",
11
+ "/usr/bin/google-chrome-stable"
12
+ ]
13
+
14
+ CHROME_OPTIONS = [
15
+ "--headless",
16
+ "--no-sandbox",
17
+ "--disable-dev-shm-usage",
18
+ "--disable-gpu",
19
+ "--disable-web-security",
20
+ "--disable-features=VizDisplayCompositor",
21
+ "--disable-setuid-sandbox",
22
+ "--memory-pressure-off",
23
+ "--max_old_space_size=4096",
24
+ "--disable-background-timer-throttling",
25
+ "--disable-renderer-backgrounding",
26
+ "--disable-features=TranslateUI",
27
+ "--disable-ipc-flooding-protection",
28
+ "--window-size=1920,1080",
29
+ "--enable-automation",
30
+ "--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",
31
+ "--enable-logging",
32
+ "--v=1"
33
+ ]
34
+
35
+ # Timeouts
36
+ DEFAULT_PAGE_LOAD_TIMEOUT = 30
37
+ DEFAULT_IMPLICIT_WAIT = 10
38
+ DEFAULT_EXPLICIT_WAIT = 10
39
+
40
+ # API Keys
41
+ GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
42
+
43
+ # Request history limit
44
+ MAX_REQUEST_HISTORY = 50
45
+
46
+ # File paths
47
+ TEMP_DIR = "/tmp"
48
+
49
+ # CSS Styling
50
+ UI_CSS = """
51
+ .gradio-container {
52
+ max-width: 100% !important;
53
+ }
54
+ .main-container {
55
+ display: flex;
56
+ gap: 20px;
57
+ }
58
+ .sidebar {
59
+ min-width: 350px;
60
+ max-width: 400px;
61
+ }
62
+ .main-content {
63
+ flex: 1;
64
+ }
65
+ .chat-container {
66
+ height: 600px;
67
+ }
68
+ """