Update tools.py
Browse files
tools.py
CHANGED
|
@@ -137,14 +137,14 @@ class multimodal_interpreter(Tool):
|
|
| 137 |
return output_text
|
| 138 |
|
| 139 |
class audio_or_mp3__interpreter(Tool):
|
| 140 |
-
name="
|
| 141 |
description = "Allows you to convert audio into text. It uses Whisper, it is a state-of-the-art model for automatic speech recognition (ASR) and speech translation"
|
| 142 |
inputs = {
|
| 143 |
'audio': {"type": "audio", "description": "the audio of interest"}
|
| 144 |
}
|
| 145 |
output_type = "string"
|
| 146 |
|
| 147 |
-
def forward(self,
|
| 148 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 149 |
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
| 150 |
|
|
|
|
| 137 |
return output_text
|
| 138 |
|
| 139 |
class audio_or_mp3__interpreter(Tool):
|
| 140 |
+
name="audio_tool"
|
| 141 |
description = "Allows you to convert audio into text. It uses Whisper, it is a state-of-the-art model for automatic speech recognition (ASR) and speech translation"
|
| 142 |
inputs = {
|
| 143 |
'audio': {"type": "audio", "description": "the audio of interest"}
|
| 144 |
}
|
| 145 |
output_type = "string"
|
| 146 |
|
| 147 |
+
def forward(self, audio):
|
| 148 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 149 |
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
| 150 |
|