File size: 520 Bytes
742e1ed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import streamlit as st
import subprocess
def run_prediction():
result = subprocess.run(['python', 'prediction.py'], stdout=subprocess.PIPE)
return result.stdout.decode('utf-8')
def run_eda():
result = subprocess.run(['python', 'eda.py'], stdout=subprocess.PIPE)
return result.stdout.decode('utf-8')
pages = {
'Prediction': run_prediction,
'EDA': run_eda,
}
selected_page = st.sidebar.selectbox('Select a page', list(pages.keys()))
page_content = pages[selected_page]()
st.write(page_content) |