saayedalam commited on
Commit
5ff1555
·
verified ·
1 Parent(s): 59949aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -13
app.py CHANGED
@@ -31,19 +31,7 @@ def get_song_lyrics(song_name: str, artist_name: str) -> str:
31
  song_name: A string representing a valid name of a song.
32
  artist_name: A string representing a valid name of a song.
33
  """
34
- genius_token = os.getenv("Genius_Lyrics")
35
- genius = lyricsgenius.Genius(genius_token)
36
-
37
- # Add headers to avoid 403 errors
38
- headers = {
39
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
40
- }
41
- genius._headers = headers # Set the headers in the API client
42
-
43
- # Optional settings
44
- genius.remove_section_headers = True # Removes [Chorus], [Verse] headers
45
- genius.excluded_terms = ["(Remix)", "(Live)"]
46
-
47
  try:
48
  # Search for the song by title and artist
49
  song = genius.search_song(song_name, artist_name)
 
31
  song_name: A string representing a valid name of a song.
32
  artist_name: A string representing a valid name of a song.
33
  """
34
+
 
 
 
 
 
 
 
 
 
 
 
 
35
  try:
36
  # Search for the song by title and artist
37
  song = genius.search_song(song_name, artist_name)