mserrao commited on
Commit
45d46a0
·
verified ·
1 Parent(s): ceebfe7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -46,7 +46,7 @@ from datasets import load_dataset
46
  dataset = load_dataset("VLR-CVC/DocVQA-2026", split="val")
47
 
48
  # 2. Access a single sample (one document)
49
- sample = dataset[5]
50
 
51
  doc_id = sample["doc_id"]
52
  category = sample["doc_category"]
@@ -63,12 +63,12 @@ questions = sample["questions"]
63
  answers = sample["answers"]
64
 
65
  # 5. Visualize Q&A pairs for a document
66
- for q, a in zip(questions, answers):
67
  print("-" * 50)
68
- print(f"Question: {q['question']}")
69
- print(f"Answer: {a['answer']}")
 
70
  print("-" * 50)
71
-
72
  ```
73
 
74
  ## Structure of a Sample
 
46
  dataset = load_dataset("VLR-CVC/DocVQA-2026", split="val")
47
 
48
  # 2. Access a single sample (one document)
49
+ sample = dataset[0]
50
 
51
  doc_id = sample["doc_id"]
52
  category = sample["doc_category"]
 
63
  answers = sample["answers"]
64
 
65
  # 5. Visualize Q&A pairs for a document
66
+ for q, q_id, a in zip(questions['question'], questions['question_id'], answers['answer']):
67
  print("-" * 50)
68
+ print(f"Question ID: {q_id}")
69
+ print(f"Question: {q}")
70
+ print(f"Answer: {a}")
71
  print("-" * 50)
 
72
  ```
73
 
74
  ## Structure of a Sample