menikev commited on
Commit
00706b3
·
verified ·
1 Parent(s): 91e81a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -42,6 +42,9 @@ def send_email(to_email, subject, body):
42
  except Exception as e:
43
  return f"Failed to send email: {str(e)}"
44
 
 
 
 
45
  tools = [Tool(name="Send Email", func=send_email, description="Sends an email. Args: to_email, subject, body")]
46
 
47
  prompt = PromptTemplate.from_template(
 
42
  except Exception as e:
43
  return f"Failed to send email: {str(e)}"
44
 
45
+ # Create the agent after loading the model
46
+ agent = create_react_agent(local_llm, tools, prompt)
47
+
48
  tools = [Tool(name="Send Email", func=send_email, description="Sends an email. Args: to_email, subject, body")]
49
 
50
  prompt = PromptTemplate.from_template(