shawarmabytes commited on
Commit
762bc34
1 Parent(s): a3b612d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -18,7 +18,11 @@ def tester(text):
18
  results = classifier(text)
19
  st.write(results[0]['label'])
20
 
21
- if (results[0]['label']=="anger"):
 
 
 
 
22
  st_player("https://www.youtube.com/watch?v=kh0BWQ4Uo6w")
23
 
24
  elif (results[0]['label']=="disgust"):
@@ -27,9 +31,7 @@ def tester(text):
27
  elif (results[0]['label']=="fear"):
28
  st_player("https://www.youtube.com/watch?v=iyEUvUcMHgE")
29
 
30
- elif (results[0]['label']=="joy"):
31
- st_player("https://www.youtube.com/watch?v=1k8craCGpgs")
32
-
33
  elif (results[0]['label']=="sadness"):
34
  #video = YouTubeVideo("1k8craCGpgs")
35
  #display(video)
 
18
  results = classifier(text)
19
  st.write(results[0]['label'])
20
 
21
+
22
+ if (results[0]['label']=="joy"):
23
+ 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)
24
+
25
+ elif (results[0]['label']=="anger"):
26
  st_player("https://www.youtube.com/watch?v=kh0BWQ4Uo6w")
27
 
28
  elif (results[0]['label']=="disgust"):
 
31
  elif (results[0]['label']=="fear"):
32
  st_player("https://www.youtube.com/watch?v=iyEUvUcMHgE")
33
 
34
+
 
 
35
  elif (results[0]['label']=="sadness"):
36
  #video = YouTubeVideo("1k8craCGpgs")
37
  #display(video)