teven commited on
Commit
f622ed0
1 Parent(s): c7feb0b
Files changed (2) hide show
  1. .gitattributes +1 -0
  2. app.py +3 -0
.gitattributes CHANGED
@@ -25,3 +25,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
28
+ *.jsonl filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -2,12 +2,14 @@ import streamlit as st
2
  import datasets
3
  from functools import partial
4
 
 
5
  data = datasets.load_dataset("json", data_files="small_test_data.jsonl")["train"].select(range(100))
6
 
7
  bad_cutoff = st.slider('Bad words cutoff', 0, 1)
8
  stp_cutoff = st.slider('Stop words cutoff', 0, 1)
9
  ppl_cutoff = st.slider('ppl cutoff', 0, 1)
10
 
 
11
  def filter_ppl(examples, invert=False):
12
  return [ppl < ppl_cutoff for ppl in examples["ppl"]]
13
 
@@ -17,4 +19,5 @@ def filter_bad(examples, invert=False):
17
  def filter_stp(examples, invert=False):
18
  return [stp > stp_cutoff for stp in examples["stop_words"]]
19
 
 
20
  st.table(data)
 
2
  import datasets
3
  from functools import partial
4
 
5
+
6
  data = datasets.load_dataset("json", data_files="small_test_data.jsonl")["train"].select(range(100))
7
 
8
  bad_cutoff = st.slider('Bad words cutoff', 0, 1)
9
  stp_cutoff = st.slider('Stop words cutoff', 0, 1)
10
  ppl_cutoff = st.slider('ppl cutoff', 0, 1)
11
 
12
+
13
  def filter_ppl(examples, invert=False):
14
  return [ppl < ppl_cutoff for ppl in examples["ppl"]]
15
 
 
19
  def filter_stp(examples, invert=False):
20
  return [stp > stp_cutoff for stp in examples["stop_words"]]
21
 
22
+
23
  st.table(data)