Spaces:
Build error
Build error
| import streamlit as st | |
| import pandas as pd | |
| import warnings | |
| from src.gen_train import generatehousecontrol | |
| warnings.filterwarnings("ignore") | |
| st.set_page_config(page_title='Rhythm Training', layout = 'wide', initial_sidebar_state = 'auto') | |
| def generate_training(house): | |
| labels = generatehousecontrol(house) | |
| st.write("### Step") | |
| st.write(f"Step: {labels['Step']}") | |
| st.write(f"Rhythm: {labels['Step Rhythm']}") | |
| st.write(f"Bounce: {labels['Bounce']}") | |
| st.write("### Body") | |
| st.write(f"Body: {labels['Body']}") | |
| st.write(f"Rhythm: {labels['Body Rhythm']}") | |
| if 'Body Direction' in labels: | |
| st.write(f"Direction: {labels['Body Direction']}") | |
| # @st.cache(suppress_st_warning=True, persist = True) | |
| def main(): | |
| house = pd.read_csv('data/house_universe.csv') | |
| # st.set_page_config(layout="wide") | |
| height = 650 | |
| st.markdown(""" <style> | |
| #MainMenu {visibility: hidden;} | |
| footer {visibility: hidden;} | |
| </style> """, | |
| unsafe_allow_html=True | |
| ) | |
| # Select Plot Option | |
| st.sidebar.markdown("## Click here to generate Rhythm Training") | |
| gen_training = st.sidebar.button('Generate Training!') | |
| if gen_training: | |
| generate_training(house) | |
| if __name__ == "__main__": | |
| main() |