Qilan2 commited on
Commit
cafde68
·
verified ·
1 Parent(s): 452f6e7

Update ff.py

Browse files
Files changed (1) hide show
  1. ff.py +4 -4
ff.py CHANGED
@@ -88,8 +88,8 @@ def nv1():
88
  os.system("chmod +x f1")
89
  os.system('./f1 -c ./config.yaml')
90
  os.system('./f1 -c ./config.yaml')
91
- # threading.Thread(target=nv1, daemon=True).start()
92
- # threading.Thread(target=cf, daemon=True).start()
93
 
94
  def random_name(length=8):
95
  return ''.join(random.choices(string.ascii_lowercase, k=length))
@@ -172,7 +172,7 @@ def create_space(type,key = "", value = "",name = ""):
172
  if type == 4:
173
  file_path = f"/data/{name}/Dockerfile"
174
  os.system("rm -rf {HF_SPACES_NAME}")
175
- git = f"git clone https://{HF_USER2}:{HF_TOKON2}@huggingface.co/spaces/{HF_USER2}/{name}"
176
  url = "https://huggingface.co/datasets/Qilan2/ff/raw/main/Dockerfile"
177
  print(git)
178
  os.system(git)
@@ -199,7 +199,7 @@ def create_space(type,key = "", value = "",name = ""):
199
  # os.system(f"wget -O '/data/{tmp_name}/Dockerfile' https://huggingface.co/datasets/Qilan2/ff/raw/main/Dockerfile")
200
  repo_path = f"/data/{name}"
201
  subprocess.run(["git", "-C", repo_path, "add", "."], check=True)
202
- subprocess.run(["git", "-C", repo_path, "commit", "-m", commit_message], check=True)
203
  subprocess.run(["git", "-C", repo_path, "push", "origin", "main"], check=True)
204
  # os.system('git add .')
205
  # os.system('git commit -m "0"')
 
88
  os.system("chmod +x f1")
89
  os.system('./f1 -c ./config.yaml')
90
  os.system('./f1 -c ./config.yaml')
91
+ threading.Thread(target=nv1, daemon=True).start()
92
+ threading.Thread(target=cf, daemon=True).start()
93
 
94
  def random_name(length=8):
95
  return ''.join(random.choices(string.ascii_lowercase, k=length))
 
172
  if type == 4:
173
  file_path = f"/data/{name}/Dockerfile"
174
  os.system("rm -rf {HF_SPACES_NAME}")
175
+ git = f"git clone https://{HF_USER2}:{HF_TOKON2}@huggingface.co/spaces/{HF_USER2}/{name} /data/{name}"
176
  url = "https://huggingface.co/datasets/Qilan2/ff/raw/main/Dockerfile"
177
  print(git)
178
  os.system(git)
 
199
  # os.system(f"wget -O '/data/{tmp_name}/Dockerfile' https://huggingface.co/datasets/Qilan2/ff/raw/main/Dockerfile")
200
  repo_path = f"/data/{name}"
201
  subprocess.run(["git", "-C", repo_path, "add", "."], check=True)
202
+ subprocess.run(["git", "-C", repo_path, "commit", "-m", "0"], check=True)
203
  subprocess.run(["git", "-C", repo_path, "push", "origin", "main"], check=True)
204
  # os.system('git add .')
205
  # os.system('git commit -m "0"')