Chris4K commited on
Commit
bdba3bf
1 Parent(s): 5195b56

Update word_counter.py

Browse files
Files changed (1) hide show
  1. word_counter.py +3 -3
word_counter.py CHANGED
@@ -3,11 +3,11 @@ from transformers import Tool
3
 
4
  class WordCounterTool(Tool):
5
  name = "word_counter"
6
- description = "This is a tool for counting word of an input."
7
  inputs = ["text"]
8
  outputs = ["text"]
9
 
10
- def __call__(self, prompt: str):
11
- words = str.split(" ")
12
  return len(words)
13
 
 
3
 
4
  class WordCounterTool(Tool):
5
  name = "word_counter"
6
+ description = "This tool counts the words of a text."
7
  inputs = ["text"]
8
  outputs = ["text"]
9
 
10
+ def __call__(self, text: str):
11
+ words = text.split(" ")
12
  return len(words)
13