m-ric HF staff commited on
Commit
c311332
1 Parent(s): 29b840f

Update text_download.py

Browse files
Files changed (1) hide show
  1. text_download.py +3 -3
text_download.py CHANGED
@@ -11,10 +11,10 @@ TEXT_DOWNLOAD_DESCRIPTION = (
11
 
12
  class TextDownloadTool(Tool):
13
  name = "text_downloader"
14
- inputs= {"url": {"type": str, "description": "url to download file from"}}
15
- output_type= str
16
  description = TEXT_DOWNLOAD_DESCRIPTION
17
 
18
- def __call__(self, url):
19
  return BeautifulSoup(requests.get(url).text, features="html.parser").get_text()
20
 
 
11
 
12
  class TextDownloadTool(Tool):
13
  name = "text_downloader"
14
+ inputs= {"url": {"type": "string", "description": "url to download file from"}}
15
+ output_type= "string"
16
  description = TEXT_DOWNLOAD_DESCRIPTION
17
 
18
+ def forward(self, url):
19
  return BeautifulSoup(requests.get(url).text, features="html.parser").get_text()
20