Rudra Rahul Chothe commited on
Commit
fda19f9
·
verified ·
1 Parent(s): e418977

Initial upload

Browse files
Files changed (1) hide show
  1. 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
- # Save the token to the Hugging Face folder
15
- HfFolder.save_token(access_token)
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
+