davanstrien HF staff commited on
Commit
7f422f9
·
1 Parent(s): 0a120a0

wrap in code block

Browse files
Files changed (1) hide show
  1. README.md +7 -3
README.md CHANGED
@@ -58,11 +58,14 @@ from datasets import load_dataset
58
  import json
59
  ds = load_dataset("davanstrien/test_dataset_cogapp")
60
  data = ds['train'][0]
61
- cog.out(json.dumps({k: str(v) for k,v in data.items()}, indent=2, ensure_ascii=False))
62
- ]]] -->
 
 
 
63
  {
64
  "file": "pst_fenske_ver02_data_sn84026497_00280776129_1880042101_0834_002_6_96.jpg",
65
- "image": "<PIL.JpegImagePlugin.JpegImageFile image mode=L size=388x395 at 0x11F715D90>",
66
  "label": "0",
67
  "pub_date": "1880-04-21 00:00:00",
68
  "page_seq_num": "834",
@@ -79,4 +82,5 @@ cog.out(json.dumps({k: str(v) for k,v in data.items()}, indent=2, ensure_ascii=F
79
  "url": "https://news-navigator.labs.loc.gov/data/pst_fenske_ver02/data/sn84026497/00280776129/1880042101/0834/002_6_96.jpg",
80
  "page_url": "https://chroniclingamerica.loc.gov/data/batches/pst_fenske_ver02/data/sn84026497/00280776129/1880042101/0834.jp2"
81
  }
 
82
  <!-- [[[end]]] -->
 
58
  import json
59
  ds = load_dataset("davanstrien/test_dataset_cogapp")
60
  data = ds['train'][0]
61
+ example = json.dumps({k: str(v) for k,v in data.items()}, indent=2)
62
+ cog.out(
63
+ "```\n{}\n```".format(example))
64
+ )]]] -->
65
+ ```
66
  {
67
  "file": "pst_fenske_ver02_data_sn84026497_00280776129_1880042101_0834_002_6_96.jpg",
68
+ "image": "<PIL.JpegImagePlugin.JpegImageFile image mode=L size=388x395 at 0x126315C50>",
69
  "label": "0",
70
  "pub_date": "1880-04-21 00:00:00",
71
  "page_seq_num": "834",
 
82
  "url": "https://news-navigator.labs.loc.gov/data/pst_fenske_ver02/data/sn84026497/00280776129/1880042101/0834/002_6_96.jpg",
83
  "page_url": "https://chroniclingamerica.loc.gov/data/batches/pst_fenske_ver02/data/sn84026497/00280776129/1880042101/0834.jp2"
84
  }
85
+ ```
86
  <!-- [[[end]]] -->