Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ import requests
|
|
9 |
from scipy.io.wavfile import write
|
10 |
from groq import Groq
|
11 |
import json
|
|
|
12 |
|
13 |
# Load environment variables from .env file
|
14 |
load_dotenv()
|
@@ -62,8 +63,11 @@ def analyze_song(mp3_file):
|
|
62 |
genre = ", ".join(genre_list)
|
63 |
image_url = result.json()['result']['spotify']['album']['images'][0]['url']
|
64 |
else:
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
67 |
genius_response = get_song_info_from_lyrics(transcription)
|
68 |
title = genius_response["title"]
|
69 |
artist = genius_response["artist"]
|
|
|
9 |
from scipy.io.wavfile import write
|
10 |
from groq import Groq
|
11 |
import json
|
12 |
+
from genius import get_song_info_from_lyrics
|
13 |
|
14 |
# Load environment variables from .env file
|
15 |
load_dotenv()
|
|
|
63 |
genre = ", ".join(genre_list)
|
64 |
image_url = result.json()['result']['spotify']['album']['images'][0]['url']
|
65 |
else:
|
66 |
+
# song_info = get_song_info_from_lyrics(transcription)
|
67 |
+
# title = song_info["title"]
|
68 |
+
# artist = song_info["artist"]
|
69 |
+
image_url = ""
|
70 |
+
genre = ""
|
71 |
genius_response = get_song_info_from_lyrics(transcription)
|
72 |
title = genius_response["title"]
|
73 |
artist = genius_response["artist"]
|