Spaces:
Sleeping
Sleeping
fix the way to get API Key
Browse files
assemblyai_audio__transcript_tool.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from langchain_community.document_loaders import AssemblyAIAudioTranscriptLoader
|
| 2 |
from smolagents import Tool
|
| 3 |
|
|
@@ -21,7 +22,7 @@ class AssemblyAIAudioTranscriptTool(Tool):
|
|
| 21 |
"""
|
| 22 |
loader = AssemblyAIAudioTranscriptLoader(
|
| 23 |
file_path=url,
|
| 24 |
-
api_key=
|
| 25 |
)
|
| 26 |
document = loader.load()
|
| 27 |
return document[0].page_content
|
|
|
|
| 1 |
+
import os
|
| 2 |
from langchain_community.document_loaders import AssemblyAIAudioTranscriptLoader
|
| 3 |
from smolagents import Tool
|
| 4 |
|
|
|
|
| 22 |
"""
|
| 23 |
loader = AssemblyAIAudioTranscriptLoader(
|
| 24 |
file_path=url,
|
| 25 |
+
api_key=os.getenv("ASSEMBLYAI_API_KEY")
|
| 26 |
)
|
| 27 |
document = loader.load()
|
| 28 |
return document[0].page_content
|