Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|