Update app.py
Browse files
app.py
CHANGED
|
@@ -224,6 +224,10 @@ def cellpose_segment(filepath, resize = 1000,max_iter = 250):
|
|
| 224 |
flows = flows.resize((Lx, Ly), resample = Image.BICUBIC)
|
| 225 |
|
| 226 |
fname_out = os.path.splitext(filepath[-1])[0]+"_outlines.png"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
outpix.save(fname_out) #"outlines.png")
|
| 228 |
print(fname_out)
|
| 229 |
|
|
|
|
| 224 |
flows = flows.resize((Lx, Ly), resample = Image.BICUBIC)
|
| 225 |
|
| 226 |
fname_out = os.path.splitext(filepath[-1])[0]+"_outlines.png"
|
| 227 |
+
try:
|
| 228 |
+
os.remove(fname_out)
|
| 229 |
+
except:
|
| 230 |
+
continue
|
| 231 |
outpix.save(fname_out) #"outlines.png")
|
| 232 |
print(fname_out)
|
| 233 |
|