AksharaSachin commited on
Commit
be5d7b8
·
verified ·
1 Parent(s): 4c8a79e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -48,21 +48,21 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
48
  try:
49
  llm = ChatOllama(model="llama3.1")
50
 
51
- search = DuckDuckGoSearchRun()
52
- tools = [
53
- Tool(
54
- name="DuckDuckGo Search",
55
- func=search.run,
56
- description="Useful for answering questions about current events or the web."
57
- )
58
- ]
59
  agent = initialize_agent(
60
- tools,
61
- llm,
62
- agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
63
- verbose=True,
64
- handle_parsing_errors=True
65
- )
66
  except Exception as e:
67
  print(f"Error instantiating agent: {e}")
68
  return f"Error initializing agent: {e}", None
 
48
  try:
49
  llm = ChatOllama(model="llama3.1")
50
 
51
+ search = DuckDuckGoSearchRun()
52
+ tools = [
53
+ Tool(
54
+ name="DuckDuckGo Search",
55
+ func=search.run,
56
+ description="Useful for answering questions about current events or the web."
57
+ )
58
+ ]
59
  agent = initialize_agent(
60
+ tools,
61
+ llm,
62
+ agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
63
+ verbose=True,
64
+ handle_parsing_errors=True
65
+ )
66
  except Exception as e:
67
  print(f"Error instantiating agent: {e}")
68
  return f"Error initializing agent: {e}", None