Beracles commited on
Commit
9728c81
·
1 Parent(s): 89a35b5

change url format

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -30,9 +30,9 @@ ais = {
30
  }
31
 
32
  clouddisks = {
33
- "b_demo_hf": "pgsoft-clouddisk",
34
- "pgdemo2": "pgsoft-clouddisk",
35
- "pgdemo_dev": "pgsoft-clouddisk_dev",
36
  }
37
 
38
  identity = os.environ.get("identity")
@@ -42,7 +42,7 @@ if not identity:
42
  ai = "stevez-ai"
43
  if identity in ais:
44
  ai = ais[identity]
45
- clouddisk = "pgsoft-clouddisk"
46
  if identity in clouddisks:
47
  clouddisk = clouddisks[identity]
48
 
@@ -62,7 +62,6 @@ def run(hf_token, service, game, functionality, nlp_command):
62
  if redirect is not None:
63
  ai = redirect
64
  ai_url = f"https://{ai}.hf.space"
65
- clouddisk_url = f"https://{clouddisk}.hf.space"
66
 
67
  if token is None or token == "":
68
  return "please specify hf token"
@@ -79,7 +78,7 @@ def run(hf_token, service, game, functionality, nlp_command):
79
  service_start = beijing()
80
  print(f"<<<<<<<<<<<<<< service starts at {service_start} <<<<<<<<<<<<<<")
81
  if service in ["download game", "upload game", "list games"]:
82
- res = app_util.call_clouddisk(clouddisk_url, service, nlp_command, token)
83
  res = json.loads(res)
84
  if res["result"] is None:
85
  outp = {"status": "Failure"}
 
30
  }
31
 
32
  clouddisks = {
33
+ "b_demo_hf": "pgsoft/clouddisk",
34
+ "pgdemo2": "pgsoft/clouddisk",
35
+ "pgdemo_dev": "pgsoft/clouddisk_dev",
36
  }
37
 
38
  identity = os.environ.get("identity")
 
42
  ai = "stevez-ai"
43
  if identity in ais:
44
  ai = ais[identity]
45
+ clouddisk = "pgsoft/clouddisk"
46
  if identity in clouddisks:
47
  clouddisk = clouddisks[identity]
48
 
 
62
  if redirect is not None:
63
  ai = redirect
64
  ai_url = f"https://{ai}.hf.space"
 
65
 
66
  if token is None or token == "":
67
  return "please specify hf token"
 
78
  service_start = beijing()
79
  print(f"<<<<<<<<<<<<<< service starts at {service_start} <<<<<<<<<<<<<<")
80
  if service in ["download game", "upload game", "list games"]:
81
+ res = app_util.call_clouddisk(clouddisk, service, nlp_command, token)
82
  res = json.loads(res)
83
  if res["result"] is None:
84
  outp = {"status": "Failure"}