Spaces:
Sleeping
Sleeping
Upload tools.py
Browse files
tools.py
CHANGED
@@ -14,7 +14,11 @@ class PythonRunTool(Tool):
|
|
14 |
Execute trusted Python code and return printed output + repr() of the last expression (or _result variable).
|
15 |
"""
|
16 |
inputs = {
|
17 |
-
"code": {
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
output_type = "string"
|
20 |
|
@@ -103,8 +107,18 @@ class AudioTranscriptionTool(Tool):
|
|
103 |
Transcribe an audio file with OpenAI Whisper, returns plain text."
|
104 |
"""
|
105 |
inputs = {
|
106 |
-
"path": {
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
109 |
output_type = "string"
|
110 |
|
@@ -124,7 +138,11 @@ class SimpleOCRTool(Tool):
|
|
124 |
Return any text spotted in an image via pytesseract OCR.
|
125 |
"""
|
126 |
inputs = {
|
127 |
-
"path": {
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
output_type = "string"
|
130 |
|
|
|
14 |
Execute trusted Python code and return printed output + repr() of the last expression (or _result variable).
|
15 |
"""
|
16 |
inputs = {
|
17 |
+
"code": {
|
18 |
+
"type": "string",
|
19 |
+
"description": "Python code to execute",
|
20 |
+
"required": True
|
21 |
+
}
|
22 |
}
|
23 |
output_type = "string"
|
24 |
|
|
|
107 |
Transcribe an audio file with OpenAI Whisper, returns plain text."
|
108 |
"""
|
109 |
inputs = {
|
110 |
+
"path": {
|
111 |
+
"type": "string",
|
112 |
+
"description": "Path to audio file",
|
113 |
+
"required": True
|
114 |
+
},
|
115 |
+
"model": {
|
116 |
+
"type": "string",
|
117 |
+
"description": "Model name for transcription (default: whisper-1)",
|
118 |
+
"required": False,
|
119 |
+
"default": "whisper-1",
|
120 |
+
"nullable": True
|
121 |
+
}
|
122 |
}
|
123 |
output_type = "string"
|
124 |
|
|
|
138 |
Return any text spotted in an image via pytesseract OCR.
|
139 |
"""
|
140 |
inputs = {
|
141 |
+
"path": {
|
142 |
+
"type": "string",
|
143 |
+
"description": "Path to image file",
|
144 |
+
"required": True
|
145 |
+
}
|
146 |
}
|
147 |
output_type = "string"
|
148 |
|