piadonabauer commited on
Commit
40ecef1
·
verified ·
1 Parent(s): bc107af

handle missing values

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -79,7 +79,7 @@ def fetch_random_entry(annotator):
79
 
80
  def save_rating(entry_id, turn, annotator, alignment, quality, consistency, overall):
81
  """Save the given ratings into the database."""
82
- if annotator:
83
  rating = {
84
  "rater": annotator,
85
  "alignment": alignment,
 
79
 
80
  def save_rating(entry_id, turn, annotator, alignment, quality, consistency, overall):
81
  """Save the given ratings into the database."""
82
+ if annotator and entry_id != '' and turn != '':
83
  rating = {
84
  "rater": annotator,
85
  "alignment": alignment,