From 63def7fac4a5772fa4e4610e5e2f63d5aa44a027 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 25 Oct 2025 22:33:50 +0530 Subject: [PATCH] nikunj: refactored image loading part --- src/apps/public/home.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/apps/public/home.py b/src/apps/public/home.py index 5a6a8cec..163d4415 100644 --- a/src/apps/public/home.py +++ b/src/apps/public/home.py @@ -1,10 +1,20 @@ +from PIL import Image import streamlit as st +@st.cache_resource +def load_image(): + return Image.open("assets/image.gif") + + def home(): st.title("Welcome to Jarvis - Your Virtual AI Assistant!") st.toast("Welcome to Jarvis!", icon="👋") - st.image("assets/image.gif", caption="Empower Your Digital Life with Jarvis", use_container_width=True) + st.image( + load_image(), + caption="Empower Your Digital Life with Jarvis", + use_container_width=True, + ) st.markdown(""" ## Key Features