Rudra Rahul Chothe
commited on
Initial upload
Browse files- src/__init__.py +4 -9
src/__init__.py
CHANGED
@@ -11,14 +11,8 @@ access_token = os.getenv("HF_ACCESS_TOKEN")
|
|
11 |
if access_token is None:
|
12 |
raise ValueError("HF_ACCESS_TOKEN environment variable is not set")
|
13 |
|
14 |
-
#
|
15 |
-
|
16 |
-
|
17 |
-
# Authenticate
|
18 |
-
HfFolder.get_token()
|
19 |
-
|
20 |
-
# Create a new repository
|
21 |
-
create_repo("image-search-engine-fashion", private=False)
|
22 |
|
23 |
# Upload the folder
|
24 |
upload_folder(
|
@@ -26,4 +20,5 @@ upload_folder(
|
|
26 |
repo_id="rudra0410/image-search-engine-fashion",
|
27 |
repo_type="model",
|
28 |
commit_message="Initial upload"
|
29 |
-
)
|
|
|
|
11 |
if access_token is None:
|
12 |
raise ValueError("HF_ACCESS_TOKEN environment variable is not set")
|
13 |
|
14 |
+
#authenticate
|
15 |
+
hf_api=HfApi(token=access_token)
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
# Upload the folder
|
18 |
upload_folder(
|
|
|
20 |
repo_id="rudra0410/image-search-engine-fashion",
|
21 |
repo_type="model",
|
22 |
commit_message="Initial upload"
|
23 |
+
)
|
24 |
+
|