danu9327 commited on
Commit
2c428dc
·
1 Parent(s): 1b5bd74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -107,7 +107,7 @@ def highlight_segmentation(x, y):
107
  try:
108
  seg_value = seg.numpy()[y, x]
109
  print(f"Mouse over position: ({x}, {y}), Segmentation value: {seg_value}")
110
- except IndexError:
111
  print(f"Invalid mouse position: ({x}, {y}), Segmentation value cannot be retrieved.")
112
  else:
113
  print("Segmentation information is not available.")
 
107
  try:
108
  seg_value = seg.numpy()[y, x]
109
  print(f"Mouse over position: ({x}, {y}), Segmentation value: {seg_value}")
110
+ except (AttributeError, IndexError):
111
  print(f"Invalid mouse position: ({x}, {y}), Segmentation value cannot be retrieved.")
112
  else:
113
  print("Segmentation information is not available.")