-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexperiment_selection.py
36 lines (26 loc) · 987 Bytes
/
experiment_selection.py
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
36
def experiment_selection_page():
import pandas as pd
import streamlit as st
from experiments import experiment_map
from data_tools import st_saved_dataset_selector
#############
# Select Experiment Type
#############
selected_dataset = st_saved_dataset_selector()
if selected_dataset != "None":
df = pd.read_csv(selected_dataset, index_col="PaperId")
st.subheader("Compiled dataframe shape")
st.write(df.shape)
st.subheader("First 5 entries")
st.write(df.head(5))
EXPERIMENTS = ["Example"]
st.header("Select Experiment")
experiment_name = st.selectbox(
"Select Experiment you want to run:", ["None", *experiment_map.keys()]
)
if experiment_name in experiment_map:
Experiment = experiment_map[experiment_name]
experiment = Experiment(df)
experiment.run()
if __name__ == "__main__":
experiment_selection_page()