autonomous019 commited on
Commit
f911137
1 Parent(s): a7f36d2
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -71,8 +71,14 @@ def self_caption(image):
71
  print("Predictions")
72
  print(preds)
73
  print("The preds type is : ",type(preds))
74
-
75
- return(preds[0].split('.')[0])
 
 
 
 
 
 
76
 
77
  def classify_image(image):
78
  results = image_pipe(image)
 
71
  print("Predictions")
72
  print(preds)
73
  print("The preds type is : ",type(preds))
74
+ pred_keys = ["Prediction"]
75
+ pred_value = preds
76
+
77
+ pred_dictionary = dict(zip(pred_keys, pred_value))
78
+ print("Pred dictionary")
79
+ print(pred_dictionary)
80
+ return(pred_dictionary)
81
+ #return(preds[0].split('.')[0])
82
 
83
  def classify_image(image):
84
  results = image_pipe(image)