import random import numpy as np import plotly.express as px import streamlit as st from src import (StoryGenerator, run_create_statistics, run_play_storytelling, run_probability_emote, display_logs) st.set_page_config(page_title='Storytelling ' + u'\U0001F5BC', page_icon=u'\U0001F5BC', layout="wide", ) gen = StoryGenerator() container_mode = st.sidebar.container() container_guide = st.container() container_param = st.sidebar.container() container_button = st.sidebar.container() mode = container_mode.radio( "Select a mode", ('Probability Emote', 'Check Logs', 'Create Statistics', 'Play Storytelling'), index=0) if mode == 'Create Statistics': run_create_statistics(gen, container_guide, container_param, container_button) elif mode == 'Check Logs': display_logs(gen, container_guide, container_param, container_button) elif mode == 'Play Storytelling': run_play_storytelling(gen, container_guide, container_param, container_button) elif mode == 'Probability Emote': run_probability_emote(container_param)