Spaces:
Sleeping
Sleeping
Update tools/visit_webpage.py
Browse files- tools/visit_webpage.py +1 -5
tools/visit_webpage.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
from typing import Any, Optional
|
| 2 |
from smolagents.tools import Tool
|
| 3 |
|
| 4 |
class VisitWebpageTool(Tool):
|
|
@@ -37,7 +36,4 @@ class VisitWebpageTool(Tool):
|
|
| 37 |
except RequestException as e:
|
| 38 |
return f"Error fetching the webpage: {str(e)}"
|
| 39 |
except Exception as e:
|
| 40 |
-
return f"An unexpected error occurred: {str(e)}"
|
| 41 |
-
|
| 42 |
-
def __init__(self, *args, **kwargs):
|
| 43 |
-
self.is_initialized = False
|
|
|
|
|
|
|
| 1 |
from smolagents.tools import Tool
|
| 2 |
|
| 3 |
class VisitWebpageTool(Tool):
|
|
|
|
| 36 |
except RequestException as e:
|
| 37 |
return f"Error fetching the webpage: {str(e)}"
|
| 38 |
except Exception as e:
|
| 39 |
+
return f"An unexpected error occurred: {str(e)}"
|
|
|
|
|
|
|
|
|