John6666 commited on
Commit
d9d4160
·
verified ·
1 Parent(s): a2982c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -46,7 +46,11 @@ custom_role_conversions=None,
46
 
47
 
48
  # Import tool from Hub
49
- image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
 
 
 
50
 
51
 
52
  agent = CodeAgent(
 
46
 
47
 
48
  # Import tool from Hub
49
+ try:
50
+ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
51
+ except Exception as e:
52
+ print(e)
53
+ image_generation_tool = None
54
 
55
 
56
  agent = CodeAgent(