gatesla commited on
Commit
ec6bf8d
1 Parent(s): 5b2054a

Update app.py

Browse files

Trying to get lists to print

Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -42,6 +42,8 @@ def visualize_prediction(pil_img, output_dict, threshold=0.7, id2label=None):
42
  if id2label is not None:
43
  labels = [id2label[x] for x in labels]
44
 
 
 
45
  plt.figure(figsize=(16, 10))
46
  plt.imshow(pil_img)
47
  ax = plt.gca()
@@ -73,7 +75,7 @@ def detect_objects(model_name,url_input,image_input,threshold):
73
 
74
  #Make prediction
75
  processed_output_list = make_prediction(image, feature_extractor, model)
76
- print(processed_output_list[1:])
77
  processed_outputs = processed_output_list[0]
78
 
79
  #Visualize prediction
 
42
  if id2label is not None:
43
  labels = [id2label[x] for x in labels]
44
 
45
+ print("Labels " + str(labels))
46
+
47
  plt.figure(figsize=(16, 10))
48
  plt.imshow(pil_img)
49
  ax = plt.gca()
 
75
 
76
  #Make prediction
77
  processed_output_list = make_prediction(image, feature_extractor, model)
78
+ print("After make_prediction" + str(processed_output_list))
79
  processed_outputs = processed_output_list[0]
80
 
81
  #Visualize prediction