shivangibithel commited on
Commit
2cab114
1 Parent(s): b83fae1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -76,7 +76,6 @@ def T2Isearch(query,focussed_word, k=5):
76
  Y = train_yt
77
  neighbor_ys = Y[I]
78
  class_freq = np.zeros(Y.shape[1])
79
-
80
  for neighbor_y in neighbor_ys:
81
  classes = np.where(neighbor_y > 0.5)[0]
82
  for _class in classes:
@@ -89,10 +88,10 @@ def T2Isearch(query,focussed_word, k=5):
89
  ranked_classes = np.argsort(-class_freq) # chosen order of pivots -- predicted sequence of all labels for the query
90
  ranked_classes_after_knn = ranked_classes[:count] # predicted sequence of top labels after knn search
91
 
 
92
  lis = ['aeroplane', 'bicycle','bird','boat','bottle','bus','car','cat','chair','cow','diningtable','dog','horse','motorbike','person','pottedplant','sheep','sofa','train','tvmonitor']
93
  class_ = lis[ranked_classes_after_knn[0]-1]
94
 
95
-
96
  # Map the image ids to the corresponding image URLs
97
  count = 0
98
  for i in range(len(image_list)):
 
76
  Y = train_yt
77
  neighbor_ys = Y[I]
78
  class_freq = np.zeros(Y.shape[1])
 
79
  for neighbor_y in neighbor_ys:
80
  classes = np.where(neighbor_y > 0.5)[0]
81
  for _class in classes:
 
88
  ranked_classes = np.argsort(-class_freq) # chosen order of pivots -- predicted sequence of all labels for the query
89
  ranked_classes_after_knn = ranked_classes[:count] # predicted sequence of top labels after knn search
90
 
91
+
92
  lis = ['aeroplane', 'bicycle','bird','boat','bottle','bus','car','cat','chair','cow','diningtable','dog','horse','motorbike','person','pottedplant','sheep','sofa','train','tvmonitor']
93
  class_ = lis[ranked_classes_after_knn[0]-1]
94
 
 
95
  # Map the image ids to the corresponding image URLs
96
  count = 0
97
  for i in range(len(image_list)):