Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/apps/auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)

Expand Down
18 changes: 18 additions & 0 deletions src/utils/greeting.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import random
from datetime import datetime

import pytz
Expand All @@ -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)