Update app.py
Browse files
app.py
CHANGED
@@ -39,12 +39,12 @@ def extract_video_info(video_items):
|
|
39 |
return video_info
|
40 |
|
41 |
# Function to set background image and logo
|
42 |
-
def set_bg_hack(
|
43 |
-
main_bg_ext =
|
44 |
-
logo_ext =
|
45 |
|
46 |
-
main_bg_encoded = base64.b64encode(
|
47 |
-
logo_encoded = base64.b64encode(
|
48 |
|
49 |
st.markdown(
|
50 |
f"""
|
@@ -99,7 +99,7 @@ def get_restricted_video_link(video_id):
|
|
99 |
# Streamlit app layout
|
100 |
def main():
|
101 |
# Set background image and logo
|
102 |
-
set_bg_hack("cover.png", "logo.
|
103 |
|
104 |
st.title("Display Latest Videos from YouTube Channels")
|
105 |
|
@@ -220,5 +220,3 @@ if st.button("Get Insights"):
|
|
220 |
|
221 |
# Display the scraped live scores at the bottom
|
222 |
if st.button("Show Live Scores"):
|
223 |
-
live_scores = scrape_live_scores()
|
224 |
-
st.write(live_scores)
|
|
|
39 |
return video_info
|
40 |
|
41 |
# Function to set background image and logo
|
42 |
+
def set_bg_hack(main_bg_url, logo_url):
|
43 |
+
main_bg_ext = main_bg_url.split(".")[-1]
|
44 |
+
logo_ext = logo_url.split(".")[-1]
|
45 |
|
46 |
+
main_bg_encoded = base64.b64encode(requests.get(main_bg_url).content).decode()
|
47 |
+
logo_encoded = base64.b64encode(requests.get(logo_url).content).decode()
|
48 |
|
49 |
st.markdown(
|
50 |
f"""
|
|
|
99 |
# Streamlit app layout
|
100 |
def main():
|
101 |
# Set background image and logo
|
102 |
+
set_bg_hack("https://huggingface.co/spaces/Nkuku/FVGC/blob/main/cover.png", "https://huggingface.co/spaces/Nkuku/FVGC/blob/main/logo.jpg")
|
103 |
|
104 |
st.title("Display Latest Videos from YouTube Channels")
|
105 |
|
|
|
220 |
|
221 |
# Display the scraped live scores at the bottom
|
222 |
if st.button("Show Live Scores"):
|
|
|
|