wondervictor commited on
Commit
0415acd
·
verified ·
1 Parent(s): 7d19f01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -80,7 +80,8 @@ def inference_point(input_img, evt: gr.SelectData,):
80
 
81
  # Assume 'points' is a list of (x, y) coordinates to specify where the user clicks
82
  # Process the image and points to create a segmentation map accordingly
83
- _, visualized_output = demo.run_on_image_with_points(img, points)
 
84
  end_time = time.time()
85
  print("inf time",end_time - start_time)
86
  return visualized_output
 
80
 
81
  # Assume 'points' is a list of (x, y) coordinates to specify where the user clicks
82
  # Process the image and points to create a segmentation map accordingly
83
+ text_features = torch.from_numpy(np.load("./text_embedding/lvis_coco_text_embedding.npy"))
84
+ _, visualized_output = demo.run_on_image_with_points(img, points,text_features)
85
  end_time = time.time()
86
  print("inf time",end_time - start_time)
87
  return visualized_output