orionweller commited on
Commit
14955d2
1 Parent(s): e3ecc1f

minor improvements

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. dataset_loading.py +1 -1
app.py CHANGED
@@ -322,7 +322,7 @@ if corpus is not None and queries is not None and qrels is not None:
322
  container.divider()
323
 
324
  for i, (docid, title, text) in enumerate(doc_texts):
325
- container.markdown(f"## {docid}")
326
  container.markdown(f"#### {highlighted_titles[i]}", True)
327
  container.markdown(f"\n{highlighted_texts[i]}", True)
328
  current_checkboxes.append((docid, container.checkbox(f'{docid} is Non-Relevant', key=docid)))
 
322
  container.divider()
323
 
324
  for i, (docid, title, text) in enumerate(doc_texts):
325
+ container.markdown(f"## {docid}: relevance: {qrels[str(inst_num)][docid]}")
326
  container.markdown(f"#### {highlighted_titles[i]}", True)
327
  container.markdown(f"\n{highlighted_texts[i]}", True)
328
  current_checkboxes.append((docid, container.checkbox(f'{docid} is Non-Relevant', key=docid)))
dataset_loading.py CHANGED
@@ -55,7 +55,7 @@ def load_local_queries(queries_file):
55
  inst = json.loads(line)
56
  if id_key not in inst:
57
  id_key = "query_id"
58
- qid2text[inst[id_key]] = inst["text"]
59
  return qid2text
60
 
61
 
 
55
  inst = json.loads(line)
56
  if id_key not in inst:
57
  id_key = "query_id"
58
+ qid2text[inst[id_key]] = inst["text"].replace("\t", " === ")
59
  return qid2text
60
 
61