Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
-
|
|
|
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
|