Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ from scipy.io.wavfile import write
|
|
11 |
# load_dotenv()
|
12 |
|
13 |
def song_history(message):
|
14 |
-
question = "Tell me the history of the song: " + message
|
15 |
completion = client.chat.completions.create(
|
16 |
model="llama3-8b-8192",
|
17 |
messages=[question],
|
@@ -57,6 +57,7 @@ def analyze_song(mp3_file):
|
|
57 |
lyrics = transcription # Use the transcription as lyrics
|
58 |
tempo_key = "Sample Tempo/Key"
|
59 |
history = "History"
|
|
|
60 |
return title, artist, genre, instrumentation, lyrics, tempo_key, history, image_url # Return the mp3 file for replay
|
61 |
|
62 |
# Custom CSS to set a fun musical theme image as background
|
|
|
11 |
# load_dotenv()
|
12 |
|
13 |
def song_history(message):
|
14 |
+
question = "Tell me the history or a fun fact of the song (in a single line!): " + message
|
15 |
completion = client.chat.completions.create(
|
16 |
model="llama3-8b-8192",
|
17 |
messages=[question],
|
|
|
57 |
lyrics = transcription # Use the transcription as lyrics
|
58 |
tempo_key = "Sample Tempo/Key"
|
59 |
history = "History"
|
60 |
+
history = song_history(title)
|
61 |
return title, artist, genre, instrumentation, lyrics, tempo_key, history, image_url # Return the mp3 file for replay
|
62 |
|
63 |
# Custom CSS to set a fun musical theme image as background
|