AMR-KELEG commited on
Commit
b6f7a4c
·
1 Parent(s): bbaf429

Track the app file

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -60,7 +60,7 @@ dataset = datasets.load_dataset(dataset_name, token=os.environ["HF_TOKEN"])["tes
60
 
61
  for sample in dataset:
62
  text = sample["sentence"]
63
- labels= [DIALECTS[i] for i in range(len(DIALECTS)) if int(sample[DIALECTS[i]]) == 1]
64
  pred = predict_top_p(text)
65
  sample["pred"] = pred
66
  st.write("Text:", text)
 
60
 
61
  for sample in dataset:
62
  text = sample["sentence"]
63
+ labels= [DIALECTS[i] for i in range(len(DIALECTS)) if DIALECTS[i] in sample.keys() and int(sample[DIALECTS[i]]) == 1]
64
  pred = predict_top_p(text)
65
  sample["pred"] = pred
66
  st.write("Text:", text)