Geek7 commited on
Commit
02d96ed
·
1 Parent(s): f9d4014

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import streamlit as st
2
  from pytube import YouTube
 
3
 
4
  hide_streamlit_style = """
5
  <style>
@@ -54,7 +55,9 @@ class YouTubeDownloader:
54
  file_ = YouTubeDownloader.download_video(url)
55
  st.video(file_)
56
  YouTubeDownloader.helper_message()
57
- st.html(confetti_animation_script, height=0) # Include confetti script
 
 
58
 
59
  st.markdown("")
60
 
@@ -75,7 +78,7 @@ class YouTubeDownloader:
75
  import validators
76
 
77
  if not validators.url(url):
78
- st.error("Hi there 👋 URL seems invalid 👽")
79
  st.stop()
80
 
81
  @classmethod
 
1
  import streamlit as st
2
  from pytube import YouTube
3
+ from streamlit.components.v1 import components
4
 
5
  hide_streamlit_style = """
6
  <style>
 
55
  file_ = YouTubeDownloader.download_video(url)
56
  st.video(file_)
57
  YouTubeDownloader.helper_message()
58
+
59
+ # Use components.html to inject the HTML directly
60
+ components.html(confetti_animation_script, height=0)
61
 
62
  st.markdown("")
63
 
 
78
  import validators
79
 
80
  if not validators.url(url):
81
+ st.error("Hi there 👋 URL seems invalid 👽")
82
  st.stop()
83
 
84
  @classmethod