import streamlit as st # Custom imports from multipage import MultiPage from pages import upload, model, Home, state # import your pages here #from pages import * # Create an instance of the app app = MultiPage() # Title of the main page source = [] mod = '' # Add all your applications (pages) here app.add_page("Home", Home.app) app.add_page("Upload Data", upload.app) app.add_page("Model Selector", model.app) app.add_page("Display", state.app) #app.add_page("Results", Results.app) # The main app app.run()
fname = st.sidebar.file_uploader('Project Results', accept_multiple_files=False) if not fname: st.stop() tar = tarfile.open(fileobj=fname, mode="r:gz") tar.extractall() DATADIR = Path(tar.getnames()[0]) config_file = DATADIR/'pages.yaml' with open(config_file) as fh: config = yaml.safe_load(fh) # Create an instance of the app app = MultiPage() project_sites = config['pages'] # # results = { # # 'Summary': ('Summary', Summary.app, DATADIR), # # 'Path': ('Pathway Analysis', Pathway.app, DATADIR), # # 'Assembly': ('Assembly', Assembly.app, DATADIR)} # available_pages = {'Home': ('Home', Home.app, DATADIR), 'EDA': ('Exploratory Data Analysis', EDA.app, DATADIR), 'DiffAb': ('Differential Expression/Abundance', DiffAb.app, DATADIR), 'Expression': ('Gene Expression', Expression.app, DATADIR)} for page_name, page in available_pages.items(): if page_name not in project_sites:
import sys from pathlib import Path file = Path(__file__).resolve() parent, root = file.parent, file.parents[1] sys.path.append(str(root)) try: sys.path.remove(str(parent)) except ValueError: # Already removed pass # Custom imports from multipage import MultiPage from pages import penguins, session_state, stock_SP500, boston_housing from pages import home # Create an instance of the app app = MultiPage() # Add all your application here app.add_page("Home", home.app) app.add_page("Session State Demos", session_state.app) app.add_page("Penguins", penguins.app) app.add_page("Stocks S&P 500", stock_SP500.app) app.add_page("Boston Housing - Random Forest Regressor", boston_housing.app) # The main app app.run()
import streamlit as st from multipage import MultiPage from pages import visual, zillow, ml, main, About app = MultiPage() app.add_page('Main', main.app) app.add_page('About', About.app) app.add_page('Real Estate Market Visualization', visual.app) app.add_page('Searching on Zillow', zillow.app) app.add_page('House Price Estimation', ml.app) app.run()
import streamlit as st import tarfile from pathlib import Path # Custom imports from multipage import MultiPage from pages import PCA, DiffAb, Summary st.set_page_config(page_title="mBARq App", layout='wide') DATADIR = Path('./data/test') # Create an instance of the app app = MultiPage() # Title of the main page st.title("NCCR Microbiomes ETHZ prototype") app.add_page("PCA", PCA.app) # fname = st.sidebar.file_uploader('Project Results', accept_multiple_files=False) # if not fname: # st.stop() # tar = tarfile.open(fileobj=fname, mode="r:gz") # tar.extractall(DATADIR) # project_sites = [s.name for s in DATADIR.glob('**/*') if not s.is_file()] # project_name = project_sites[0] # # st.header(f'Project Name: {project_name}') # # results = {'Summary': ('Summary', Summary.app), # 'PCA': ('PCA', PCA.app), # 'DiffAb': ('Differential Expression/Abundance', DiffAb.app)} # # for page_name, page in results.items(): # if page_name not in project_sites:
import streamlit as st # Custom imports from multipage import MultiPage from pages import home, page1, page2 # import your pages here # Create an instance of the app app = MultiPage() # Title of the main page st.title("Streamlit multipages") # Add all your applications (pages) here app.add_page("Home", home.app) app.add_page("Pagina1", page1.app) app.add_page("Pagina2", page2.app) # The main app app.run()
import streamlit as st from multipage import MultiPage import pull_eval_cases_page import forecast_modeling_page app = MultiPage() st.title("Covid-19 Dashboard") app.add_page("Confirmed Cases per Region", pull_eval_cases_page.app) app.add_page("Covid Case Forecast Model", forecast_modeling_page.app) app.run()
import streamlit as st from multipage import save, MultiPage import pandas as pd app = MultiPage() app.next_page_button = "Next Page" app.previous_page_button = "Previous Page" def app1(): st.button("Do nothing...") if st.button("Check numbers"): var1 = 10 var2 = 5 st.write("First number: " + str(var1)) st.write('Second number: ' + str(var2)) save([var1, var2], "app1") ###### def app2(prev_vars): var1, var2 = prev_vars if st.button("Sum"): sum_var = var1 + var2 multiplication_var = 87 st.write(sum_var) save([sum_var, multiplication_var], "app2") ##### def app3(prev_vars):
columns_df = pd.DataFrame(columns, columns=['column_name', 'type']) columns_df.to_csv('data/metadata/column_type_desc.csv', index=False) # Display columns st.markdown("**Column Name**-**Type**") for i in range(columns_df.shape[0]): st.write( f"{i + 1}. **{columns_df.iloc[i]['column_name']}** - {columns_df.iloc[i]['type']}" ) st.markdown( """The above are the automated column types detected by the application in the data. In case you wish to change the column types, head over to the **Column Change** section. """ ) # Create an instance of the app app = MultiPage() # Title of the main page st.title("Data Storyteller Application") # Add all your applications (pages) here app.add_page("Upload Data", data_upload.app) app.add_page("Change Metadata", metadata.app) app.add_page("Machine Learning", machine_learning.app) app.add_page("Data Analysis", data_visualize.app) app.add_page("Y-Parameter Optimization", redundant.app) # The main app app.run()
import streamlit as st from src.home import home_app from src.data import data_app from src.graphics import graphics_app from src.model import model_app from src.load_dataset import load_dataset from multipage import save, MultiPage, start_app, clear_cache st.set_page_config( page_title="Easy ML", page_icon='💙', ) app = MultiPage() # app.start_button = "Поехали!" app.navbar_name = "Навигация" app.next_page_button = "Следующая страница" app.previous_page_button = "Предыдущая страница" # Add all your application here app.add_app("README.md", home_app) app.add_app("Просмотр датасета через Pandas", data_app) app.add_app("Построение графиков", graphics_app) app.add_app("Обучение моделей", model_app) # The main app app.run()