Commit
β’
b98d539
1
Parent(s):
7a86130
Update app.py
Browse files
app.py
CHANGED
@@ -10,9 +10,13 @@ def audio_interface(audio):
|
|
10 |
audio = gr.Audio(value=preview_url,label="Recommend Music π·")
|
11 |
return emotion,audio
|
12 |
else:
|
13 |
-
return emotion,gr.Audio(value=None,label="
|
14 |
|
15 |
-
description = "
|
|
|
|
|
|
|
|
|
16 |
|
17 |
css = """
|
18 |
#container{
|
@@ -24,7 +28,7 @@ css = """
|
|
24 |
iface = gr.Interface (title='Sentiment based Music Therapy',
|
25 |
description=description,
|
26 |
fn=audio_interface,
|
27 |
-
inputs=[gr.Audio(sources='microphone', type='filepath',label="
|
28 |
outputs=[gr.Textbox(label="Detected Emotion "),gr.Audio(label="Recommended Music π·")])
|
29 |
|
30 |
iface.launch()
|
|
|
10 |
audio = gr.Audio(value=preview_url,label="Recommend Music π·")
|
11 |
return emotion,audio
|
12 |
else:
|
13 |
+
return emotion,gr.Audio(value=None,label="Please click Submit again to refresh π")
|
14 |
|
15 |
+
description = """ **"Feel the Music, Heal the Soul"**
|
16 |
+
\nThis project is all about using music to make you feel better. We listen to the way you speak and figure out if you're feeling happy, sad, angry or anything else. Then, we suggest some classic Indian instrumental music that can help lift your mood.
|
17 |
+
\nThe special thing is, this music is chosen just for you based on how you're feeling at that moment. If you're stressed, we'll pick some calming ragas. If you're down, we'll find some uplifting tunes to cheer you up.
|
18 |
+
\nAnd it doesn't stop there! Just hit that 'Submit' button again, and we'll give you a brand new music recommendation. It's like having your own personal music therapist, but without the therapy couch.
|
19 |
+
\nSo let the melodies move you, one note at a time. Who knows, you might just find your rhythm again!"""
|
20 |
|
21 |
css = """
|
22 |
#container{
|
|
|
28 |
iface = gr.Interface (title='Sentiment based Music Therapy',
|
29 |
description=description,
|
30 |
fn=audio_interface,
|
31 |
+
inputs=[gr.Audio(sources='microphone', type='filepath',label="Unveil Your Soul β¨")],
|
32 |
outputs=[gr.Textbox(label="Detected Emotion "),gr.Audio(label="Recommended Music π·")])
|
33 |
|
34 |
iface.launch()
|