nightfury commited on
Commit
ec1e968
1 Parent(s): cb97d35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -20,8 +20,22 @@ from clipseg.models.clipseg import CLIPDensePredT
20
  #clone_from (str, optional) — Either a repository url or repo_id. Example:
21
  #api = HfApi()
22
 
 
 
 
23
  from huggingface_hub import Repository
24
- with Repository(local_dir="clipseg", clone_from="ThereforeGames/txt2mask/repositories/clipseg/")
 
 
 
 
 
 
 
 
 
 
 
25
  #.commit(commit_message="clipseg uploaded...")
26
  # with open("file.txt", "w+") as f:
27
  # f.write(json.dumps({"hey": 8}))
 
20
  #clone_from (str, optional) — Either a repository url or repo_id. Example:
21
  #api = HfApi()
22
 
23
+ #from huggingface_hub import Repository
24
+ #with Repository(local_dir="clipseg", clone_from="ThereforeGames/txt2mask/repositories/clipseg/")
25
+
26
  from huggingface_hub import Repository
27
+ repo = Repository(local_dir="clipseg")
28
+
29
+ #from huggingface_hub import HfApi
30
+ #api = HfApi()
31
+ repo.upload_folder(
32
+ folder_path="clipseg",
33
+ path_in_repo="ThereforeGames/txt2mask/repositories/clipseg/",
34
+ repo_id="ThereforeGames/txt2mask",
35
+ # repo_type="dataset",
36
+ # ignore_patterns="**/logs/*.txt",
37
+ )
38
+
39
  #.commit(commit_message="clipseg uploaded...")
40
  # with open("file.txt", "w+") as f:
41
  # f.write(json.dumps({"hey": 8}))