Spaces:
Running
Running
Update tools/detect_elements.py
Browse files- tools/detect_elements.py +3 -2
tools/detect_elements.py
CHANGED
@@ -17,9 +17,10 @@ class DetectElementsTool(Tool):
|
|
17 |
}
|
18 |
output_type = "string"
|
19 |
|
20 |
-
def __init__(self):
|
21 |
super().__init__()
|
22 |
-
self.
|
|
|
23 |
logger.debug(f"DetectElementsTool initialized: is_initialized={self.is_initialized}")
|
24 |
|
25 |
def forward(self, screenshot_path: Optional[str], element_type="table"):
|
|
|
17 |
}
|
18 |
output_type = "string"
|
19 |
|
20 |
+
def __init__(self, driver=None):
|
21 |
super().__init__()
|
22 |
+
self.driver = driver # Store driver for consistency, even if unused
|
23 |
+
self.is_initialized = True # No dependency on driver, so always True
|
24 |
logger.debug(f"DetectElementsTool initialized: is_initialized={self.is_initialized}")
|
25 |
|
26 |
def forward(self, screenshot_path: Optional[str], element_type="table"):
|