Gas96 commited on
Commit
4261e8d
·
verified ·
1 Parent(s): a1fc975

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,6 +6,7 @@ import yaml
6
  from tools.final_answer import FinalAnswerTool
7
  from Gradio_UI import GradioUI
8
 
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
@@ -33,8 +34,7 @@ def get_fun_fact(topic: str) -> str:
33
  Returns:
34
  A string reporting a fun fact related to the topic or an error message.
35
  """
36
- try:
37
- search_tool = DuckDuckGoSearchTool()
38
  results = search_tool.run(f"{topic} fun fact")
39
  if results:
40
  fun_fact = results[0][:300]
 
6
  from tools.final_answer import FinalAnswerTool
7
  from Gradio_UI import GradioUI
8
 
9
+ search_tool = DuckDuckGoSearchTool()
10
 
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
  @tool
 
34
  Returns:
35
  A string reporting a fun fact related to the topic or an error message.
36
  """
37
+ try:
 
38
  results = search_tool.run(f"{topic} fun fact")
39
  if results:
40
  fun_fact = results[0][:300]