ash-171 commited on
Commit
7eca765
·
verified ·
1 Parent(s): acb260d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -47,9 +47,10 @@ model_id = "https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud",
47
  custom_role_conversions=None,
48
  )
49
 
 
50
 
51
  # Import tool from Hub
52
- image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
53
 
54
  with open("prompts.yaml", 'r') as stream:
55
  prompt_templates = yaml.safe_load(stream)
 
47
  custom_role_conversions=None,
48
  )
49
 
50
+ hf_token = os.getenv("HF_TOKEN")
51
 
52
  # Import tool from Hub
53
+ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True, hf_token=hf_token)
54
 
55
  with open("prompts.yaml", 'r') as stream:
56
  prompt_templates = yaml.safe_load(stream)