diff --git a/css/main.css b/css/main.css index 1545a74b..72adc071 100644 --- a/css/main.css +++ b/css/main.css @@ -1299,3 +1299,12 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { .dark .tgw-accordion { border: 1px solid var(--border-color-dark); } + +.welcome-greeting { + text-align: center; + margin-top: 35vh; + font-size: 24px; + opacity: 0.6; + padding-left: 1rem; + padding-right: 1rem; +} diff --git a/modules/html_generator.py b/modules/html_generator.py index 144f2593..5227e87e 100644 --- a/modules/html_generator.py +++ b/modules/html_generator.py @@ -1,3 +1,4 @@ +import datetime import functools import html import os @@ -389,8 +390,21 @@ def generate_chat_html(history, name1, name2, reset_cache=False): return output +def time_greeting(): + current_hour = datetime.datetime.now().hour + if 5 <= current_hour < 12: + return "Good morning!" + elif 12 <= current_hour < 18: + return "Good afternoon!" + else: + return "Good evening!" + + def chat_html_wrapper(history, name1, name2, mode, style, character, reset_cache=False): - if mode == 'instruct': + if len(history['visible']) == 0: + greeting = f"