Replacing the TOKEN_HUB to a newly created token TOKEN_HUB_V2 required to access the private repo with the results https://huggingface.co/datasets/rafaelpadilla/queue_requested_object_detection_datasets
Browse files
init.py
CHANGED
@@ -5,7 +5,7 @@ from huggingface_hub import HfApi, Repository
|
|
5 |
from dotenv import load_dotenv
|
6 |
|
7 |
load_dotenv()
|
8 |
-
TOKEN_HUB = os.environ.get("
|
9 |
QUEUE_REPO = os.environ.get("QUEUE_REPO", None)
|
10 |
QUEUE_PATH = os.environ.get("QUEUE_PATH", None)
|
11 |
|
@@ -92,4 +92,4 @@ def is_model_on_hub(model_name, revision="main") -> bool:
|
|
92 |
return True, None
|
93 |
except Exception as e:
|
94 |
print(f"Could not get the model from the hub.: {e}")
|
95 |
-
return False, "was not found on hub!"
|
|
|
5 |
from dotenv import load_dotenv
|
6 |
|
7 |
load_dotenv()
|
8 |
+
TOKEN_HUB = os.environ.get("TOKEN_HUB_V2", None)
|
9 |
QUEUE_REPO = os.environ.get("QUEUE_REPO", None)
|
10 |
QUEUE_PATH = os.environ.get("QUEUE_PATH", None)
|
11 |
|
|
|
92 |
return True, None
|
93 |
except Exception as e:
|
94 |
print(f"Could not get the model from the hub.: {e}")
|
95 |
+
return False, "was not found on hub!"
|