Gas96 commited on
Commit
9414ce5
·
verified ·
1 Parent(s): 3acd509
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -34,7 +34,7 @@ def get_fun_fact(topic: str) -> str:
34
  """
35
  try:
36
  search_tool = DuckDuckGoSearchTool()
37
- results = search_tool.run(f"{topic} fun fact")
38
  if results and isinstance(results, list):
39
  fun_fact = results[0][:300]
40
  return f"Here's a fun fact about {topic}: {fun_fact}"
 
34
  """
35
  try:
36
  search_tool = DuckDuckGoSearchTool()
37
+ results = search_tool.text(f"{topic} fun fact")
38
  if results and isinstance(results, list):
39
  fun_fact = results[0][:300]
40
  return f"Here's a fun fact about {topic}: {fun_fact}"