|
|
|
@ -14,8 +14,6 @@ st.set_page_config(
|
|
|
|
|
page_title='Seanium Brain'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model_options = ['text-davinci-003', 'text-curie-001', 'text-babbage-001', 'text-ada-001']
|
|
|
|
|
header = st.container()
|
|
|
|
|
body = st.container()
|
|
|
|
@ -24,8 +22,6 @@ SESSION_TIME = st.session_state['SESSION_TIME']
|
|
|
|
|
CURRENT_LOG_FILE = f'{LOG_PATH}/log_{SESSION_TIME}.log'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_log():
|
|
|
|
|
if not os.path.exists(CURRENT_LOG_FILE):
|
|
|
|
|
util.write_file(f'Session {SESSION_TIME}\n\n', CURRENT_LOG_FILE)
|
|
|
|
@ -89,6 +85,7 @@ def execute_brain(q):
|
|
|
|
|
# log question
|
|
|
|
|
log(f'\n\n\n\n[{str(time.ctime())}] - QUESTION: {q}')
|
|
|
|
|
|
|
|
|
|
print(f'update: {check_update.isUpdated()}')
|
|
|
|
|
if check_update.isUpdated():
|
|
|
|
|
# if brain-info is updated
|
|
|
|
|
brain.build(chunk_size)
|
|
|
|
|