emroca commited on
Commit
01cc349
·
verified ·
1 Parent(s): fa95039

Update app.py

Browse files

adicionar token de hf

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import yaml
6
  from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
@@ -84,7 +85,7 @@ custom_role_conversions=None,
84
 
85
 
86
  # Import tool from Hub
87
- image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
88
 
89
  with open("prompts.yaml", 'r') as stream:
90
  prompt_templates = yaml.safe_load(stream)
 
6
  from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
9
+ import os
10
 
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
  @tool
 
85
 
86
 
87
  # Import tool from Hub
88
+ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True, use_auth_token=os.getenv("HF_TOKEN"))
89
 
90
  with open("prompts.yaml", 'r') as stream:
91
  prompt_templates = yaml.safe_load(stream)