Spaces:
Running
Running
Update tools.py
Browse files
tools.py
CHANGED
@@ -6,6 +6,7 @@ import requests
|
|
6 |
from bs4 import BeautifulSoup
|
7 |
import openpyxl
|
8 |
import wikipedia
|
|
|
9 |
|
10 |
class WikipediaTool(Tool):
|
11 |
name = "wikipedia_api"
|
@@ -33,10 +34,9 @@ class ExcelTool(Tool):
|
|
33 |
}
|
34 |
output_type = "string"
|
35 |
|
36 |
-
def forward(self,
|
37 |
-
|
38 |
-
|
39 |
-
return result
|
40 |
|
41 |
class WebscraperTool(Tool):
|
42 |
name = "webscraper"
|
|
|
6 |
from bs4 import BeautifulSoup
|
7 |
import openpyxl
|
8 |
import wikipedia
|
9 |
+
import pandas as pd
|
10 |
|
11 |
class WikipediaTool(Tool):
|
12 |
name = "wikipedia_api"
|
|
|
34 |
}
|
35 |
output_type = "string"
|
36 |
|
37 |
+
def forward(self, path: str):
|
38 |
+
df = pd.read_excel(path, engine = "openpyxl")
|
39 |
+
return df
|
|
|
40 |
|
41 |
class WebscraperTool(Tool):
|
42 |
name = "webscraper"
|