Spaces:
Sleeping
Sleeping
Update firecrawler.py
Browse files- firecrawler.py +5 -5
firecrawler.py
CHANGED
|
@@ -1,23 +1,23 @@
|
|
| 1 |
from firecrawl import FirecrawlApp
|
| 2 |
from pydantic import BaseModel, Field
|
| 3 |
from typing import List
|
|
|
|
| 4 |
import os
|
| 5 |
|
|
|
|
| 6 |
#Fetch API key fior firecrawl
|
| 7 |
api_key = os.getenv("api_key")
|
| 8 |
|
| 9 |
-
|
| 10 |
def execute_firecrawl(websites_string: str):
|
| 11 |
"""
|
| 12 |
-
|
| 13 |
|
| 14 |
Args:
|
| 15 |
websites_string (str): A string of websites separated by commas, spaces, or new lines
|
| 16 |
-
prompt_string (str): The prompt to use for extraction
|
| 17 |
-
api_key (str): Your Firecrawl API key
|
| 18 |
|
| 19 |
Returns:
|
| 20 |
-
|
| 21 |
"""
|
| 22 |
# Initialize the FirecrawlApp with the API key
|
| 23 |
app = FirecrawlApp(api_key = api_key)
|
|
|
|
| 1 |
from firecrawl import FirecrawlApp
|
| 2 |
from pydantic import BaseModel, Field
|
| 3 |
from typing import List
|
| 4 |
+
from smolagents import tool
|
| 5 |
import os
|
| 6 |
|
| 7 |
+
|
| 8 |
#Fetch API key fior firecrawl
|
| 9 |
api_key = os.getenv("api_key")
|
| 10 |
|
| 11 |
+
@tool
|
| 12 |
def execute_firecrawl(websites_string: str):
|
| 13 |
"""
|
| 14 |
+
This tool scans a url and returns its intended purpose
|
| 15 |
|
| 16 |
Args:
|
| 17 |
websites_string (str): A string of websites separated by commas, spaces, or new lines
|
|
|
|
|
|
|
| 18 |
|
| 19 |
Returns:
|
| 20 |
+
Intended purpose of the website/s
|
| 21 |
"""
|
| 22 |
# Initialize the FirecrawlApp with the API key
|
| 23 |
app = FirecrawlApp(api_key = api_key)
|