Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -43,9 +43,9 @@ def get_song_lyrics(artist:str = "artist", song:str = "song") -> str:
|
|
43 |
if json.loads(response.text).get('error','ok').lower()=='no lyrics found':
|
44 |
return 'No lyrics found'
|
45 |
if response.status_code == 200:
|
46 |
-
return f
|
47 |
|
48 |
-
return
|
49 |
|
50 |
@tool
|
51 |
def get_random_fact()-> str:
|
|
|
43 |
if json.loads(response.text).get('error','ok').lower()=='no lyrics found':
|
44 |
return 'No lyrics found'
|
45 |
if response.status_code == 200:
|
46 |
+
return f"lyrics: {json.loads(response.text).get('lyrics')}"
|
47 |
|
48 |
+
return f"Error: {str(response.status_code)}"
|
49 |
|
50 |
@tool
|
51 |
def get_random_fact()-> str:
|