Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ from urllib.parse import quote_plus
|
|
9 |
|
10 |
# Import browser components
|
11 |
from scripts.text_web_browser import SimpleTextBrowser, SearchInformationTool
|
|
|
12 |
|
13 |
@tool
|
14 |
def analyze_content(text: str, analysis_type: str = "general") -> str:
|
@@ -47,10 +48,16 @@ def analyze_content(text: str, analysis_type: str = "general") -> str:
|
|
47 |
|
48 |
class ResearchSystem:
|
49 |
def __init__(self):
|
50 |
-
#
|
51 |
self.browser = SimpleTextBrowser(
|
52 |
viewport_size=4096,
|
53 |
-
downloads_folder="./downloads"
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
)
|
55 |
|
56 |
# Initialize model
|
|
|
9 |
|
10 |
# Import browser components
|
11 |
from scripts.text_web_browser import SimpleTextBrowser, SearchInformationTool
|
12 |
+
from scripts.cookies import COOKIES
|
13 |
|
14 |
@tool
|
15 |
def analyze_content(text: str, analysis_type: str = "general") -> str:
|
|
|
48 |
|
49 |
class ResearchSystem:
|
50 |
def __init__(self):
|
51 |
+
# Create browser with proper request_kwargs initialization
|
52 |
self.browser = SimpleTextBrowser(
|
53 |
viewport_size=4096,
|
54 |
+
downloads_folder="./downloads",
|
55 |
+
request_kwargs={
|
56 |
+
"cookies": COOKIES,
|
57 |
+
"headers": {
|
58 |
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
|
59 |
+
}
|
60 |
+
}
|
61 |
)
|
62 |
|
63 |
# Initialize model
|