INNER CODE UNIT · Python

home

shakedzy/companion · companion.py:36

def home():
    """
    Homepage of web UI
    """
    global memory, chatbot, config

    should_restart = bool(request.args.get('restart', 0))
    if should_restart:
        restart()

    memory = Memory()
    try:
        chatbot = Chatbot(config=config, memory=memory)
        languages = [config.language.learning, config.language.native, 'A']
        auto_send_recording = int(config.behavior.auto_send_recording)
        user_profile_img = config.user.image
        bot_profile_img = config.bot.image
    except Exception as e:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…