text: import sys
  
  if len(sys.argv) < 2:
      print("USAGE:", sys.argv[0], "path/to/data/to/seed/from")
      exit(1)
  else:
      path = sys.argv[1]
  text = open(path).read().lower()
  for diversity in [0.2, 0.5, 1.0, 1.2]:
      print()
      print('----- diversity:', diversity)
  
      generated = ''
      sentence = text[start_index: start_index + maxlen]
      generated += sentence
      print('----- Generating with seed: "' + sentence + '"')
      sys.stdout.write(generated)
  
      for i in range(400):
          x = np.zeros((1, maxlen, len(chars)))
          for t, char in enumerate(sentence):
              x[0, t, char_indices[char]] = 1.
  
          preds = model.predict(x, verbose=0)[0]
          next_index = sample(preds, diversity)
          next_char = indices_char[next_index]
  
          generated += next_char
          sentence = sentence[1:] + next_char
  
          sys.stdout.write(next_char)
          sys.stdout.flush()
      print()
  
  