diff --git a/src/apps/auth/auth.py b/src/apps/auth/auth.py index 3586aa42..2ca50c27 100644 --- a/src/apps/auth/auth.py +++ b/src/apps/auth/auth.py @@ -4,7 +4,7 @@ import pytz import streamlit as st -from src.utils.greeting import GreetUser +from src.utils.greeting import GetRandomWelcomeMessage, GreetUser def unix_to_ist(timestamp): @@ -22,7 +22,7 @@ def auth(): else: st.title(f"🙏 {GreetUser(st.user.given_name)}") - st.success("Welcome to Jarvis AI Assistant!", icon="🤝") + st.success(GetRandomWelcomeMessage(), icon="🤝") st.image(st.user.picture, caption=st.user.name) st.write("Email:", st.user.email) diff --git a/src/utils/greeting.py b/src/utils/greeting.py index c3898693..50f3cbf8 100644 --- a/src/utils/greeting.py +++ b/src/utils/greeting.py @@ -1,3 +1,4 @@ +import random from datetime import datetime import pytz @@ -13,3 +14,20 @@ def GreetUser(name): elif 17 <= hour < 21: return f"Good Evening, {name}" return f"Good Night, {name}" + + +def GetRandomWelcomeMessage(): + """Returns a random welcome message to make Jarvis feel more dynamic and natural.""" + welcome_messages = [ + "I am Jarvis Sir. Please tell me how may I help you.", + "Ready to assist you with anything you need!", + "At your service! What can I do for you today?", + "Hello! I'm here to make your day easier.", + "Great to see you! How can I assist you?", + "I'm all set to help you out. What's on your mind?", + "Standing by to help with whatever you need!", + "Your AI assistant is ready. What would you like to do?", + "Here to help! Just let me know what you need.", + "Ready and waiting to assist you today!", + ] + return random.choice(welcome_messages)