lchumaceiro commited on
Commit
6b6e0fb
·
verified ·
1 Parent(s): 7d6545e

Added token

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -5,9 +5,13 @@ import pytz
5
  import yaml
6
  import time
7
  from tools.final_answer import FinalAnswerTool
 
8
 
9
  from Gradio_UI import GradioUI
10
 
 
 
 
11
  # Sound generation tool
12
  @tool
13
  def generate_sound(sound_type: str, duration: int) -> str:
@@ -48,6 +52,7 @@ model = HfApiModel(
48
  temperature=0.5,
49
  model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
50
  custom_role_conversions=None,
 
51
  )
52
 
53
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
5
  import yaml
6
  import time
7
  from tools.final_answer import FinalAnswerTool
8
+ from huggingface_hub import InferenceClient
9
 
10
  from Gradio_UI import GradioUI
11
 
12
+ import os
13
+ hf_token = os.getenv("HF_TOKEN") # Fetch secret from Hugging Face Space
14
+
15
  # Sound generation tool
16
  @tool
17
  def generate_sound(sound_type: str, duration: int) -> str:
 
52
  temperature=0.5,
53
  model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
54
  custom_role_conversions=None,
55
+ token= hf_token
56
  )
57
 
58
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)