nightfury commited on
Commit
aca3a37
1 Parent(s): d189791

Update app_t.py

Browse files
Files changed (1) hide show
  1. app_t.py +33 -1
app_t.py CHANGED
@@ -111,4 +111,36 @@ clone = "git clone https://github.com/git"
111
  os.system("sshpass -p password ssh nightfury@localhost")
112
  os.chdir(path) # Specifying the path where the cloned project needs to be copied
113
  os.system(clone) # Cloning
114
- """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  os.system("sshpass -p password ssh nightfury@localhost")
112
  os.chdir(path) # Specifying the path where the cloned project needs to be copied
113
  os.system(clone) # Cloning
114
+ """
115
+
116
+
117
+ #from huggingface_hub import hf_hub_download
118
+ #hf_hub_download(repo_id="ThereforeGames/txt2mask", filename="/repositories/clipseg/")
119
+ #clone_from (str, optional) — Either a repository url or repo_id. Example:
120
+ #api = HfApi()
121
+
122
+ #from huggingface_hub import Repository
123
+ #with Repository(local_dir="clipseg", clone_from="ThereforeGames/txt2mask/repositories/clipseg/")
124
+ """
125
+ import sys
126
+ import os
127
+
128
+ from zipfile import ZipFile
129
+ zf = ZipFile('clipseg-master.zip', 'r')
130
+ zf.extractall('./clipseg')
131
+ zf.close()
132
+
133
+
134
+ from huggingface_hub import HfApi
135
+ api = HfApi()
136
+ api.upload_folder(
137
+ folder_path="/",
138
+ path_in_repo="ThereforeGames/txt2mask/repositories/clipseg/",
139
+ repo_id="ThereforeGames/txt2mask",
140
+ # repo_type="dataset",
141
+ # ignore_patterns="**/logs/*.txt",
142
+ )
143
+ """
144
+ #.commit(commit_message="clipseg uploaded...")
145
+ # with open("file.txt", "w+") as f:
146
+ # f.write(json.dumps({"hey": 8}))