Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to st.columns #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bsoid_app/analysis_subroutines/machine_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def show_accuracy_plot(self):
fig.suptitle('{}-fold group accuracy'.format(self.k))
ax.set_xlabel('Accuracy')
ax.set_ylabel('Group number')
col1, col2 = st.beta_columns([2, 2])
col1, col2 = st.columns([2, 2])
radio = st.radio(label='Change colors?', options=["Yes", "No"], index=1)
if radio == 'No':
col1.pyplot(fig)
Expand Down
2 changes: 1 addition & 1 deletion bsoid_app/analysis_subroutines/video_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, working_dir, prefix, features, sampled_features,
self.ordered_embeds = self.sampled_embeddings[ordered_ind, :]
self.ordered_assigns = self.soft_assignments[ordered_ind]
fig, ax = plot_enhanced_umap(self.working_dir, self.prefix, fig_size=(5, 3), save=False)
col1, col2 = st.beta_columns([2, 2])
col1, col2 = st.columns([2, 2])
col1.pyplot(fig)
self.vid_path = st.text_input('Enter corresponding video directory (Absolute path):')
try:
Expand Down
2 changes: 1 addition & 1 deletion bsoid_app/bsoid_utilities/visuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def plot_bar(sub_threshold):
st.write('If the below __% noise__ (y-axis) is unreasonable, consider refining pose-estimation software.')
sub_threshold_df = pd.DataFrame(sub_threshold)
col1, col2 = st.beta_columns([3, 2])
col1, col2 = st.columns([3, 2])
col1.line_chart(sub_threshold_df)
col2.write(sub_threshold_df)

Expand Down
2 changes: 1 addition & 1 deletion bsoid_app/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def show_classes(self):
fig1, plt1 = visuals.plot_classes(self.sampled_embeddings[self.assignments >= 0],
self.assignments[self.assignments >= 0])
plt1.suptitle('HDBSCAN assignment')
col1, col2 = st.beta_columns([2, 2])
col1, col2 = st.columns([2, 2])
col1.pyplot(fig1)

def slider(self, min_=0.5, max_=1.0):
Expand Down
4 changes: 2 additions & 2 deletions bsoid_app/machine_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ def randomforest(self):

def show_confusion_matrix(self):
fig = visuals.plot_confusion(self.validate_clf, self.x_test, self.y_test)
col1, col2 = st.beta_columns([2, 2])
col1, col2 = st.columns([2, 2])
col1.pyplot(fig[0])
col2.pyplot(fig[1])
st.write('To improve, either _increase_ minimum cluster size, or include _more data_')

def show_crossval_score(self):
fig, plt = visuals.plot_accuracy(self.validate_score)
col1, col2 = st.beta_columns([2, 2])
col1, col2 = st.columns([2, 2])
col1.pyplot(fig)
st.write('To improve, either _increase_ minimum cluster size, or include _more data_')

Expand Down
2 changes: 1 addition & 1 deletion bsoid_app/video_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def show_snippets(self):
video_bytes.append(data_url)
grp_names.append('{}'.format(file.partition('.')[0]))
col = [None] * 3
col[0], col[1], col[2] = st.beta_columns([1, 1, 1])
col[0], col[1], col[2] = st.columns([1, 1, 1])
for i in range(0, len(video_bytes) + 3, 3):
try:
col[0].markdown(
Expand Down