Spaces:
Runtime error
Runtime error
Update random_charactor_generator.py
Browse files
random_charactor_generator.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
import requests
|
|
|
2 |
|
3 |
-
|
|
|
4 |
name = "random_character"
|
5 |
-
description = "This tool
|
6 |
|
7 |
inputs = ["text"] # Adding an empty list for inputs
|
8 |
|
@@ -32,7 +34,7 @@ class RandomCharatorGeneratorTool:
|
|
32 |
|
33 |
self.is_initialized = True
|
34 |
|
35 |
-
def __call__(self,
|
36 |
if not self.is_initialized:
|
37 |
self.setup()
|
38 |
|
|
|
1 |
import requests
|
2 |
+
from transformers import Tool
|
3 |
|
4 |
+
|
5 |
+
class RandomCharatorGeneratorTool(Tool):
|
6 |
name = "random_character"
|
7 |
+
description = "This tool generates a random character based on an input."
|
8 |
|
9 |
inputs = ["text"] # Adding an empty list for inputs
|
10 |
|
|
|
34 |
|
35 |
self.is_initialized = True
|
36 |
|
37 |
+
def __call__(self, input:str):
|
38 |
if not self.is_initialized:
|
39 |
self.setup()
|
40 |
|