mouseland commited on
Commit
2ad19f9
·
verified ·
1 Parent(s): ed59ae0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
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