Qilan2 commited on
Commit
9a5f5f3
·
verified ·
1 Parent(s): 16f1047

Update ff.py

Browse files
Files changed (1) hide show
  1. ff.py +3 -3
ff.py CHANGED
@@ -153,7 +153,7 @@ def create_space(type,key = "", value = ""):
153
  return response.text
154
  if type == 3:
155
  # 创建spaces 变量
156
- url = f"https://huggingface.co/api/spaces/{HF_USER2}/{HF_SPACES_NAME}/secrets"
157
  headers = {
158
  "Content-Type": "application/json",
159
  "Authorization": f"Bearer {HF_TOKON2}"
@@ -566,8 +566,7 @@ if os.path.exists('/data/ff/.mozilla/firefox/profiles.ini') and os.path.isfile('
566
  time.sleep(30)#21600 = 6小时
567
  # github(2)
568
  response = create_space(1)
569
- # DATA_JSON2 = json.loads(DATA_JSON) # 转成字典
570
- # DATA_JSON2 = update_value(DATA_JSON2, "HF_ID", tmp_name)
571
  DATA_JSON2 = {
572
  "BACKUP_TIME": BACKUP_TIME,
573
  "HF_USER1": HF_USER1,
@@ -583,6 +582,7 @@ if os.path.exists('/data/ff/.mozilla/firefox/profiles.ini') and os.path.isfile('
583
  "CHAT_ID": CHAT_ID,
584
  "BOT_TOKEN": BOT_TOKEN
585
  }
 
586
  create_space(3,"DATA_JSON",DATA_JSON2)
587
  create_space(3,"HF_SPACES_NAME",HF_ID)
588
  create_space(4)
 
153
  return response.text
154
  if type == 3:
155
  # 创建spaces 变量
156
+ url = f"https://huggingface.co/api/spaces/{HF_USER2}/{tmp_name}/secrets"
157
  headers = {
158
  "Content-Type": "application/json",
159
  "Authorization": f"Bearer {HF_TOKON2}"
 
566
  time.sleep(30)#21600 = 6小时
567
  # github(2)
568
  response = create_space(1)
569
+ print(response)
 
570
  DATA_JSON2 = {
571
  "BACKUP_TIME": BACKUP_TIME,
572
  "HF_USER1": HF_USER1,
 
582
  "CHAT_ID": CHAT_ID,
583
  "BOT_TOKEN": BOT_TOKEN
584
  }
585
+ print(DATA_JSON2)
586
  create_space(3,"DATA_JSON",DATA_JSON2)
587
  create_space(3,"HF_SPACES_NAME",HF_ID)
588
  create_space(4)