Skip to content

Commit 7251590

Browse files
committed
visualization: small step for the slider on flagged words ratio
1 parent bf96493 commit 7251590

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ac_dc/visualization/visualization.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,16 @@ def get_cond(key, cutoff, max_cutoff):
290290
new_flagged_words,
291291
)
292292
cutoff_def = "If the flagged words ratio of a document is higher than this number, the document is removed."
293-
max_fwr = float(np.max(self.docs["flagged_words_ratio"]))
293+
max_fwr = np.max(self.docs["flagged_words_ratio"])
294+
max_fwr = np.ceil(max_fwr * 1000) / 1000
295+
max_fwr = float(max_fwr)
294296
cutoff_flagged_words_ratio = st.slider(
295-
cutoff_def, 0.0, max_fwr, max_fwr, step=0.001
297+
cutoff_def,
298+
0.000,
299+
max_fwr,
300+
max_fwr,
301+
step=0.001,
302+
format="%f",
296303
)
297304
new_key = ("flagged_words_ratio", cutoff_flagged_words_ratio, True)
298305
keys.append(new_key)

0 commit comments

Comments
 (0)