crystina-z commited on
Commit
9b90024
·
1 Parent(s): 3ae1273

differentiate unlabeled from labeled irrelevant

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -110,8 +110,8 @@ if name and model_name:
110
  result_id = result["docid"]
111
  contents = result["content"]
112
 
113
- label = qrels[str(qid)].get(str(result_id), 0)
114
- label_text = "None"
115
  if label == 3:
116
  style = "style=\"color:rgb(237, 125, 12);\""
117
  label_text = "High"
@@ -121,6 +121,9 @@ if name and model_name:
121
  elif label == 1:
122
  style = "style=\"color:rgb(241, 177, 118);\""
123
  label_text = "Low"
 
 
 
124
  else:
125
  style = "style=\"color:grey;\""
126
 
 
110
  result_id = result["docid"]
111
  contents = result["content"]
112
 
113
+ label = qrels[str(qid)].get(str(result_id), -1)
114
+ label_text = "Unlabeled"
115
  if label == 3:
116
  style = "style=\"color:rgb(237, 125, 12);\""
117
  label_text = "High"
 
121
  elif label == 1:
122
  style = "style=\"color:rgb(241, 177, 118);\""
123
  label_text = "Low"
124
+ if label == 1:
125
+ style = "style=\"color:black;\""
126
+ label_text = "Not Relevance"
127
  else:
128
  style = "style=\"color:grey;\""
129