ABVM commited on
Commit
7118cc4
·
verified ·
1 Parent(s): a48eb52

Update OpenRouter_Agent.py

Browse files
Files changed (1) hide show
  1. OpenRouter_Agent.py +4 -2
OpenRouter_Agent.py CHANGED
@@ -18,12 +18,13 @@ from smolagents import (
18
  from smolagents.utils import encode_image_base64, make_image_url
19
  #from vision_tool import image_reasoning_tool
20
  import os
 
21
 
22
  audio_transcribe_tool = Tool.from_space(
23
  "hf-audio/whisper-large-v3",
24
  name = "audio_to_text",
25
- description = "Transcribe long-form YouTube videos or audio inputs. Paste the URL to a YouTube video or upload audio file to get the transcript."
26
-
27
  )
28
 
29
  object_detection_tool = Tool.from_space(
@@ -32,6 +33,7 @@ object_detection_tool = Tool.from_space(
32
  description = "Detect objects in images or videos."
33
  )
34
 
 
35
  OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY")
36
  if not OPENROUTER_API_KEY:
37
  raise EnvironmentError("OPENROUTER_API_KEY environment variable not set")
 
18
  from smolagents.utils import encode_image_base64, make_image_url
19
  #from vision_tool import image_reasoning_tool
20
  import os
21
+ HF_API_TOKEN = os.getenv("HF_API_TOKEN")
22
 
23
  audio_transcribe_tool = Tool.from_space(
24
  "hf-audio/whisper-large-v3",
25
  name = "audio_to_text",
26
+ description = "Transcribe long-form YouTube videos or audio inputs. Paste the URL to a YouTube video or upload audio file to get the transcript.",
27
+ api_key = HF_API_TOKEN,
28
  )
29
 
30
  object_detection_tool = Tool.from_space(
 
33
  description = "Detect objects in images or videos."
34
  )
35
 
36
+
37
  OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY")
38
  if not OPENROUTER_API_KEY:
39
  raise EnvironmentError("OPENROUTER_API_KEY environment variable not set")