Spaces:
Runtime error
Runtime error
Commit
·
7b8fb1b
1
Parent(s):
da45309
Update app.py
Browse files
app.py
CHANGED
@@ -20,19 +20,34 @@ def tester(text):
|
|
20 |
|
21 |
|
22 |
if (results[0]['label']=="joy"):
|
23 |
-
a = random.randint(1,
|
24 |
-
if a == 1:
|
25 |
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
26 |
-
elif a == 2:
|
27 |
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/6JCLY0Rlx6Q?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
28 |
-
elif a == 3:
|
29 |
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/I_izvAbhExY?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
36 |
|
37 |
elif (results[0]['label']=="disgust"):
|
38 |
st_player("https://www.youtube.com/watch?v=zWq2TT3ieGE")
|
|
|
20 |
|
21 |
|
22 |
if (results[0]['label']=="joy"):
|
23 |
+
a = random.randint(1,7)
|
24 |
+
if a == 1: #Rick Astley - Never Gonna Give You Up
|
25 |
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
26 |
+
elif a == 2: #WALK THE MOON - Shut Up and Dance
|
27 |
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/6JCLY0Rlx6Q?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
28 |
+
elif a == 3: #Bee Gees - Stayin' Alive
|
29 |
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/I_izvAbhExY?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
30 |
+
elif a == 4: #Lil Nas X - Industry Baby
|
31 |
+
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/4aNUdvctOok?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
32 |
+
elif a == 5: #Earth, Wind & Fire - Let's Groove
|
33 |
+
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/Lrle0x_DHBM?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
34 |
+
elif a == 6: #BTS - 「Dynamite」 / Guitar Cover
|
35 |
+
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/zA_deMWtz8g?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
36 |
+
elif a == 7: #The Itchyworms - Penge Naman Ako N'yan
|
37 |
+
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/cYLhKaSY6is?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
38 |
+
#elif a == 8:
|
39 |
+
# components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/I_izvAbhExY?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
40 |
+
#elif a == 9:
|
41 |
+
# components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/I_izvAbhExY?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
42 |
+
#elif a == 10:
|
43 |
+
# components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/I_izvAbhExY?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
44 |
|
45 |
|
46 |
+
elif (results[0]['label']=="anger"):
|
47 |
+
components.html("""<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ?&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>""",width=560,height=325)
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
|
52 |
elif (results[0]['label']=="disgust"):
|
53 |
st_player("https://www.youtube.com/watch?v=zWq2TT3ieGE")
|