Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,6 @@ import yaml
|
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
9 |
-
|
10 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool
|
11 |
import re
|
12 |
import requests # Import the requests library
|
13 |
from bs4 import BeautifulSoup #for parsing
|
@@ -23,7 +21,7 @@ def find_the_song(arg1:str)-> str: #it's import to specify the return type
|
|
23 |
try:
|
24 |
search_term = f"site:genius.com OR site:azlyrics.com song lyrics \"{arg1}\"" #Focus on specific lyric sites
|
25 |
search_tool = DuckDuckGoSearchTool()
|
26 |
-
search_results = search_tool.
|
27 |
|
28 |
|
29 |
if search_results:
|
|
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
|
|
|
|
9 |
import re
|
10 |
import requests # Import the requests library
|
11 |
from bs4 import BeautifulSoup #for parsing
|
|
|
21 |
try:
|
22 |
search_term = f"site:genius.com OR site:azlyrics.com song lyrics \"{arg1}\"" #Focus on specific lyric sites
|
23 |
search_tool = DuckDuckGoSearchTool()
|
24 |
+
search_results = search_tool.use({"query": search_term})
|
25 |
|
26 |
|
27 |
if search_results:
|