Spaces:
Sleeping
Sleeping
config access token
Browse files- inference_resnet.py +4 -4
inference_resnet.py
CHANGED
@@ -21,10 +21,10 @@ import numpy as np
|
|
21 |
if not os.path.exists('model_classification'):
|
22 |
|
23 |
REPO_ID='Serrelab/fossil_classification_models'
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
snapshot_download(repo_id=REPO_ID,repo_type='model',local_dir='model_classification')
|
28 |
|
29 |
|
30 |
def get_model(base_arch='Nasnet',weights='imagenet',input_shape=(600,600,3),classes=64500):
|
|
|
21 |
if not os.path.exists('model_classification'):
|
22 |
|
23 |
REPO_ID='Serrelab/fossil_classification_models'
|
24 |
+
token = os.environ.get('READ_TOKEN')
|
25 |
+
if token is None:
|
26 |
+
print("warning! A read token in env variables is needed for authentication.")
|
27 |
+
snapshot_download(repo_id=REPO_ID,token=token,repo_type='model',local_dir='model_classification')
|
28 |
|
29 |
|
30 |
def get_model(base_arch='Nasnet',weights='imagenet',input_shape=(600,600,3),classes=64500):
|