Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
title: Hf
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: red
|
| 6 |
sdk: gradio
|
|
@@ -30,14 +30,14 @@ from smolagents import Tool
|
|
| 30 |
from smolagents import CodeAgent
|
| 31 |
from smolagents import HfApiModel
|
| 32 |
|
| 33 |
-
|
| 34 |
"GTimothee/hf_text2speech_tool",
|
| 35 |
token=<yourtokenhere>,
|
| 36 |
trust_remote_code=True
|
| 37 |
)
|
| 38 |
|
| 39 |
model = HfApiModel("Qwen/Qwen2.5-Coder-32B-Instruct", token=<yourtokenhere>)
|
| 40 |
-
agent = CodeAgent(tools=[
|
| 41 |
output = agent.run(
|
| 42 |
"Use your tools to read the audio file and return the transcription.",
|
| 43 |
additional_args={
|
|
@@ -45,4 +45,4 @@ output = agent.run(
|
|
| 45 |
'hf_token': <yourtokenhere>,
|
| 46 |
'model_for_transcription': 'whisper-small.en'}
|
| 47 |
)
|
| 48 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Hf Speech2text Tool
|
| 3 |
+
emoji: 💻
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: red
|
| 6 |
sdk: gradio
|
|
|
|
| 30 |
from smolagents import CodeAgent
|
| 31 |
from smolagents import HfApiModel
|
| 32 |
|
| 33 |
+
hf_speech2text_tool = Tool.from_hub(
|
| 34 |
"GTimothee/hf_text2speech_tool",
|
| 35 |
token=<yourtokenhere>,
|
| 36 |
trust_remote_code=True
|
| 37 |
)
|
| 38 |
|
| 39 |
model = HfApiModel("Qwen/Qwen2.5-Coder-32B-Instruct", token=<yourtokenhere>)
|
| 40 |
+
agent = CodeAgent(tools=[hf_speech2text_tool], model=model)
|
| 41 |
output = agent.run(
|
| 42 |
"Use your tools to read the audio file and return the transcription.",
|
| 43 |
additional_args={
|
|
|
|
| 45 |
'hf_token': <yourtokenhere>,
|
| 46 |
'model_for_transcription': 'whisper-small.en'}
|
| 47 |
)
|
| 48 |
+
```
|