angli66 commited on
Commit
a665252
·
1 Parent(s): b2b985d
Files changed (1) hide show
  1. launch.py +1 -3
launch.py CHANGED
@@ -109,9 +109,7 @@ def preprocess_imgs(tmp_dir, input_img):
109
  img = Image.open(img_tuple[0])
110
  img.thumbnail([2048, 2048], Image.Resampling.LANCZOS)
111
  img.save(f"{tmp_dir}/input_{i}.png")
112
- os.system(
113
- f"curl -L -F tmp_dir={tmp_dir} -F fn={tmp_dir}/seg_{i}.png -F image=@{tmp_dir}/input_{i}.png {SEGM_URL}/segm_img -o {tmp_dir}/seg_{i}.png"
114
- )
115
  return [Image.open(f"{tmp_dir}/seg_{i}.png") for i in range(len(input_img))]
116
 
117
 
 
109
  img = Image.open(img_tuple[0])
110
  img.thumbnail([2048, 2048], Image.Resampling.LANCZOS)
111
  img.save(f"{tmp_dir}/input_{i}.png")
112
+ os.system(SEGM_i_CALL.replace("{tmp_dir}", tmp_dir).replace("{i}", str(i)))
 
 
113
  return [Image.open(f"{tmp_dir}/seg_{i}.png") for i in range(len(input_img))]
114
 
115