Spaces:
Sleeping
Sleeping
meirk-brd
commited on
Commit
·
9220e18
1
Parent(s):
859566a
Add file content debugging
Browse files
tool.py
CHANGED
|
@@ -236,8 +236,11 @@ class BrightDataDatasetTool(Tool):
|
|
| 236 |
if isinstance(path_value, str) and os.path.isfile(path_value):
|
| 237 |
# Read the file content (smolagents writes URL as file content)
|
| 238 |
file_content = self._read_text_file(path_value)
|
|
|
|
|
|
|
| 239 |
if file_content:
|
| 240 |
extracted = self._extract_url_from_text(file_content)
|
|
|
|
| 241 |
if extracted:
|
| 242 |
return extracted
|
| 243 |
|
|
|
|
| 236 |
if isinstance(path_value, str) and os.path.isfile(path_value):
|
| 237 |
# Read the file content (smolagents writes URL as file content)
|
| 238 |
file_content = self._read_text_file(path_value)
|
| 239 |
+
import sys
|
| 240 |
+
print(f"[DEBUG _coerce_url_input] File content from {path_value}: {file_content!r}", file=sys.stderr)
|
| 241 |
if file_content:
|
| 242 |
extracted = self._extract_url_from_text(file_content)
|
| 243 |
+
print(f"[DEBUG _coerce_url_input] Extracted URL: {extracted!r}", file=sys.stderr)
|
| 244 |
if extracted:
|
| 245 |
return extracted
|
| 246 |
|