loubnabnl HF staff commited on
Commit
ce872ce
·
verified ·
1 Parent(s): 2f66a80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,11 +17,11 @@ def load_data(min_score=0.4, exclude_stories=True):
17
  return ds
18
 
19
  exclude_stories = st.checkbox("Exclude stories", False)
20
- maximum_score = 1.0 if not exclude_stories else 0.7
21
  min_value = st.slider('Select minimum selfcheck score', 0.0, maximum_score, 0.1, key='min_score')
22
 
23
  ds = load_data(min_score=min_value, exclude_stories=exclude_stories)
24
- index = st.number_input(f'Found {len(ds)} samples, choose one (max score is {max(ds['passage_score'])}', min_value=0, max_value=len(ds)-1, value=0, step=1)
25
 
26
  # Load data based on slider values and checkbox status
27
  sample = ds[index]
 
17
  return ds
18
 
19
  exclude_stories = st.checkbox("Exclude stories", False)
20
+ maximum_score = 0.7 if exclude_stories else 1.0
21
  min_value = st.slider('Select minimum selfcheck score', 0.0, maximum_score, 0.1, key='min_score')
22
 
23
  ds = load_data(min_score=min_value, exclude_stories=exclude_stories)
24
+ index = st.number_input(f'Found {len(ds)} samples, choose one', min_value=0, max_value=len(ds)-1, value=0, step=1)
25
 
26
  # Load data based on slider values and checkbox status
27
  sample = ds[index]