text: import torch
  from torch import nn,optim
  import argparse
  import torch.nn.functional as F
  from torchvision import datasets, transforms, models
  import torchvision.models as models
  import matplotlib.pyplot as plt
  import time
  import json
  import seaborn as sns
  import os 
  import numpy as np
  from PIL import Image
  from collections import OrderedDict 
  import torchvision
  import matplotlib.image as mpimg
  from torch.autograd import Variable
  import matplotlib.gridspec as gridspec
  import futility
  import fmodel
  
  
  parser = argparse.ArgumentParser(description = 'Parser for predict.py')
  
  parser.add_argument('input', default='./flowers/test/1/image_06752.jpg', nargs='?', action="store", type = str)
  parser.add_argument('--dir', action="store",dest="data_dir", default="./flowers/")
  parser.add_argument('checkpoint', default='./checkpoint.pth', nargs='?', action="store", type = str)
  parser.add_argument('--top_k', default=5, dest="top_k", action="store", type=int)
  parser.add_argument('--category_names', dest="category_names", action="store", default='cat_to_name.json')
  parser.add_argument('--gpu', default="gpu", action="store", dest="gpu")
  
  args = parser.parse_args()
  path_image = args.input
  number_of_outputs = args.top_k
  device = args.gpu
  
  path = args.checkpoint
  
  def main():
      model=fmodel.load_checkpoint(path)
      with open('cat_to_name.json', 'r') as json_file:
          cat_to_name = json.load(json_file)
          
      probabilities = fmodel.predict(path_image, model, number_of_outputs, device)
      labels = [cat_to_name[str(index + 1)] for index in np.array(probabilities[1][0])]
      probability = np.array(probabilities[0][0])
      i=0
      while i < number_of_outputs:
          print("{} with a probability of {}".format(labels[i], probability[i]))
          i += 1
      print("Finished Prediction!")
  
      
  if __name__== "__main__":
      main()