zouzx commited on
Commit
222abc5
1 Parent(s): eeef62e

fix SAM_LOCAL bug

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -151,6 +151,8 @@ def launch(port):
151
  if SAM_LOCAL:
152
  sam_predictor = sam_init(SAM_CKPT_PATH, gpu)
153
  print("load sam ckpt done.")
 
 
154
 
155
  with gr.Blocks(
156
  title="TGS - Demo"
 
151
  if SAM_LOCAL:
152
  sam_predictor = sam_init(SAM_CKPT_PATH, gpu)
153
  print("load sam ckpt done.")
154
+ else:
155
+ sam_predictor = None
156
 
157
  with gr.Blocks(
158
  title="TGS - Demo"