LapStore commited on
Commit ·
ae3ee8f
1
Parent(s): b257574
make better error handling
Browse files
server.py
CHANGED
|
@@ -96,7 +96,7 @@ class SegmenterBackground():
|
|
| 96 |
|
| 97 |
results, class_names = self.predict_image(raw_image)
|
| 98 |
|
| 99 |
-
if (results[0].masks):
|
| 100 |
return ("No thing in image") ,0 # 0 error happened ,if so it's 2 returns ,first is message
|
| 101 |
|
| 102 |
#----------> other methods
|
|
|
|
| 96 |
|
| 97 |
results, class_names = self.predict_image(raw_image)
|
| 98 |
|
| 99 |
+
if (not results[0].masks):
|
| 100 |
return ("No thing in image") ,0 # 0 error happened ,if so it's 2 returns ,first is message
|
| 101 |
|
| 102 |
#----------> other methods
|