andy-wyx commited on
Commit
4c7102b
1 Parent(s): 187f61e

config download access

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. inference_sam.py +1 -2
app.py CHANGED
@@ -15,7 +15,7 @@ dotenv.load_dotenv()
15
  import numpy as np
16
  import gradio as gr
17
  import glob
18
- from inference_sam import segmentation_sam
19
  from explanations import explain
20
  from inference_resnet import get_triplet_model
21
  from inference_beit import get_triplet_model_beit
 
15
  import numpy as np
16
  import gradio as gr
17
  import glob
18
+ # from inference_sam import segmentation_sam
19
  from explanations import explain
20
  from inference_resnet import get_triplet_model
21
  from inference_beit import get_triplet_model_beit
inference_sam.py CHANGED
@@ -31,8 +31,7 @@ if not os.path.exists('model'):
31
  print(f"Read token:{token}")
32
  if token is None:
33
  print("warning! A read token in env variables is needed for authentication.")
34
- else:
35
- snapshot_download(repo_id=REPO_ID, token=token,repo_type='model',local_dir='model')
36
 
37
  model_path = os.path.join('model', 'sam_02-06_dice_mse_0.pth')
38
  sam = sam_model_registry["default"](model_path)
 
31
  print(f"Read token:{token}")
32
  if token is None:
33
  print("warning! A read token in env variables is needed for authentication.")
34
+ snapshot_download(repo_id=REPO_ID, token=token,repo_type='model',local_dir='model')
 
35
 
36
  model_path = os.path.join('model', 'sam_02-06_dice_mse_0.pth')
37
  sam = sam_model_registry["default"](model_path)