selbl commited on
Commit
4e62ee3
1 Parent(s): 2962b1e

Upload Demos.py

Browse files
Files changed (1) hide show
  1. pages/Demos.py +93 -0
pages/Demos.py ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ def main():
4
+ st.title('Demos')
5
+
6
+ st.write('Here are some examples of what you can generate with the app. While imperfect, the app avoids the common pitfalls of underfitted models that spew incoherent words and the pitfalls of overfitted models which copy songs verbatim from the training set')
7
+
8
+ st.write('Note that all of the songs start with a verse by default. In future iterations I may add the possibility of the song starting with a chorus or other more uncommon structures')
9
+
10
+ st.subheader('Punk Love Song',divider='blue')
11
+
12
+ st.write('We begin with a classic.')
13
+
14
+ st.write('Here are some examples of the model\'s takes on some very famous song starts.')
15
+
16
+ st.markdown('**Prompt:** "_He was a boy, she was a girl_"')
17
+
18
+ st.markdown('**Output**:')
19
+
20
+ st.markdown("""_**[Verse]**_
21
+
22
+ _He was a boy, she was a girl and the sun went through my window it never happened when he had my love it didn't last much too long he was a friend to me but then the girl that you left on her knees it wasn't even a song I had for her and when she took a chance and gave up it was a sad story she said the night after the day the night I would cry_
23
+
24
+ **[Chorus]**
25
+
26
+ _It took so long for me to be your child (ooh-aahh oh yeah, oh ooh yeah) to make a man my baby (I'm sorry for what was wrong to see my mother, yeah oh oh oh) oh (hoo) ooh)_
27
+
28
+ _**[Verse]**_
29
+
30
+ _You were always on my side and my love is so far now my heart will always have me I can say my words I know they'll do me for a lifetime but the girl you love can only leave her_
31
+
32
+ **[Chorus]**
33
+
34
+ _So when will the girl say I am not right_""")
35
+
36
+ st.text('The model goes in a more grim direction than expected, though it retains that sappy and angsty teenage sound you could expect from such a line')
37
+
38
+ st.subheader('Proggessive Vibes',divider='blue')
39
+
40
+ st.write('We continue with a more instrospective, mysterious line')
41
+
42
+ st.markdown('**Prompt:** "_One day I\'ll play you sounds that can\'t be made_"')
43
+
44
+ st.markdown('**Output**:')
45
+
46
+ st.markdown("""_**[Verse]**_
47
+
48
+ _One day I'll play you sounds that can't be made but it'll all just get old and when my world starts to burn you will never stop me now I need an hour on a day that doesn't even have you I'll have the power_
49
+
50
+ **[Chorus]**
51
+
52
+ _Oh **, I need something to feel good I don't care who says "hey!" oh-hahhh I can hear all your words that won't do no more ohhohh (no no) no-ahh_
53
+
54
+ _**[Verse]**_
55
+
56
+ _Now I see you, but don't be afraid when all of your things start falling down, and then the lights fall right down the stairs I will make you feel free ohhoh_
57
+
58
+ **[Chorus]**
59
+
60
+ _Oh **, I need something to feel good I don't care who say-o_""")
61
+
62
+ st.write('The model is able to remember a chorus line and repeat it if necessary. The model also censors profanity, which is why those asterisks show up')
63
+
64
+ st.subheader('Animal Kingdom',divider='blue')
65
+
66
+ st.write('The following example showcases the model\'s ability to generate more uncommon song structures as well as dealing with songs that are not part of the finetuning')
67
+
68
+ st.markdown('**Prompt:** "_I woke up feeling like a mustelid_"')
69
+
70
+ st.markdown('**Output**:')
71
+
72
+ st.markdown("""_**[Verse]**_
73
+
74
+ _I woke up feeling like a mustelid on a midnight day I didn't have to wait, so let me in you say "it don't take so long!" just let me feel you inside of my head_
75
+
76
+ **[Pre-chorus]**
77
+
78
+ _'cause there I've got this smile like I never knew then and then the night is just begun you might also likewhen the world gets hot when it doesn't even have a clue how can it happen? you say "how is the life"_
79
+
80
+ _**[Chorus]**_
81
+
82
+ _So, baby just take a second now and I won't take you nowhere, nothing will happen 'cause there I don't know just where to turn you don't want it to go I can take this to heaven or home 'cause_
83
+
84
+ **[Post-chorus]**
85
+
86
+ _It won't happen now (ooh!) it will not happen no (it doesn't matter where we're in-I know that there ain't a reason for this now it's too far) you don't really wanna say that you're not_""")
87
+
88
+ st.write('The model is able to deal with unexpected words in a nice way. It also provides a more uncommon song structure than the typical verse and chorus.')
89
+
90
+
91
+
92
+ if __name__ == "__main__":
93
+ main()