Chris4K commited on
Commit
44c9ddf
1 Parent(s): ec5ecb6

Update sentence_counter.py

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