saayedalam commited on
Commit
35a1aa4
·
verified ·
1 Parent(s): 72ed64f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -9,6 +9,14 @@ import lyricsgenius
9
  from Gradio_UI import GradioUI
10
 
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
 
 
 
 
 
 
 
 
12
  @tool
13
  def get_song_lyrics(song_name:str, artist_name:str)-> str: #it's import to specify the return type
14
  #Keep this format for the description / args / args description but feel free to modify the tool
@@ -17,12 +25,6 @@ def get_song_lyrics(song_name:str, artist_name:str)-> str: #it's import to speci
17
  song_name: A string representing a valid name of a song.
18
  artist_name: A string representing a valid name of a song.
19
  """
20
- # Initialize the Genius API client with access token
21
- genius = lyricsgenius.Genius("Genius_Lyrics")
22
-
23
- # Setting some preferences
24
- genius.remove_section_headers = True # Removes section headers like [Chorus], [Verse], etc.
25
- genius.excluded_terms = ["(Remix)", "(Live)"] # Excludes unwanted terms from search results
26
 
27
  try:
28
  # Search for the song by title and artist
 
9
  from Gradio_UI import GradioUI
10
 
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
+
13
+ # Initialize the Genius API client with access token
14
+ genius = lyricsgenius.Genius("Genius_Lyrics")
15
+
16
+ # Setting some preferences
17
+ genius.remove_section_headers = True # Removes section headers like [Chorus], [Verse], etc.
18
+ genius.excluded_terms = ["(Remix)", "(Live)"] # Excludes unwanted terms from search results
19
+
20
  @tool
21
  def get_song_lyrics(song_name:str, artist_name:str)-> str: #it's import to specify the return type
22
  #Keep this format for the description / args / args description but feel free to modify the tool
 
25
  song_name: A string representing a valid name of a song.
26
  artist_name: A string representing a valid name of a song.
27
  """
 
 
 
 
 
 
28
 
29
  try:
30
  # Search for the song by title and artist