Skip to content

Commit 1bfe8f5

Browse files
committed
visualization: max ratio for the slider on flagged words ratio
1 parent 5a78bef commit 1bfe8f5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ac_dc/visualization/visualization.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,9 @@ def get_cond(key, cutoff, max_cutoff):
318318
new_flagged_words,
319319
)
320320
cutoff_def = "If the flagged words ratio of a document is higher than this number, the document is removed."
321+
max_fwr = np.max(self.docs["flagged_words_ratio"])
321322
cutoff_flagged_words_ratio = st.slider(
322-
cutoff_def, 0.0, 1.0, 1.0, step=0.01
323+
cutoff_def, 0.0, max_fwr, max_fwr, step=0.001
323324
)
324325
new_key = ("flagged_words_ratio", cutoff_flagged_words_ratio, True)
325326
keys.append(new_key)

0 commit comments

Comments
 (0)