Spaces:
Runtime error
Runtime error
File size: 1,175 Bytes
5c60a64 20684dc 877913f 20684dc bfa0c67 644c96b 86f2d3a 20684dc 1061dba 86f2d3a b240251 86f2d3a 20684dc 86f2d3a b240251 bfa0c67 39e71d7 bf1d936 441ec1f 20684dc bfa0c67 0c73fdd 20684dc 441ec1f 20684dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
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)
|