dchaplinsky commited on
Commit
e1748d2
1 Parent(s): c7f1ebe

Upload every_prompt.py

Browse files
Files changed (1) hide show
  1. every_prompt.py +3 -1
every_prompt.py CHANGED
@@ -55,8 +55,10 @@ class EveryPromptDataset(datasets.GeneratorBasedBuilder):
55
  def _generate_examples(self, filepaths):
56
  """This function returns the examples in the raw (text) form."""
57
  logger.info("generating examples from = %s", filepaths)
 
58
  for path in filepaths:
59
  with open(path, encoding="utf-8") as f:
60
  for instruction_str in f:
61
  instruction = json.loads(instruction_str)
62
- yield instruction["url"], instruction
 
 
55
  def _generate_examples(self, filepaths):
56
  """This function returns the examples in the raw (text) form."""
57
  logger.info("generating examples from = %s", filepaths)
58
+ key = 0
59
  for path in filepaths:
60
  with open(path, encoding="utf-8") as f:
61
  for instruction_str in f:
62
  instruction = json.loads(instruction_str)
63
+ yield key, instruction
64
+ key += 1