Spaces:
Sleeping
Sleeping
Beracles
commited on
Commit
·
182d7bc
1
Parent(s):
9728c81
change space url format
Browse files
app.py
CHANGED
|
@@ -24,9 +24,9 @@ print(f"[Seattle]: {t.replace(microsecond=0)}")
|
|
| 24 |
|
| 25 |
|
| 26 |
ais = {
|
| 27 |
-
"b_demo_hf": "stevez
|
| 28 |
-
"pgdemo2": "stevez
|
| 29 |
-
"pgdemo_dev": "stevez
|
| 30 |
}
|
| 31 |
|
| 32 |
clouddisks = {
|
|
@@ -39,7 +39,7 @@ identity = os.environ.get("identity")
|
|
| 39 |
print(f"identity: {identity}")
|
| 40 |
if not identity:
|
| 41 |
identity = "b_demo_hf"
|
| 42 |
-
ai = "stevez
|
| 43 |
if identity in ais:
|
| 44 |
ai = ais[identity]
|
| 45 |
clouddisk = "pgsoft/clouddisk"
|
|
@@ -61,7 +61,6 @@ def run(hf_token, service, game, functionality, nlp_command):
|
|
| 61 |
global ai, clouddisk
|
| 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"
|
|
@@ -95,7 +94,7 @@ def run(hf_token, service, game, functionality, nlp_command):
|
|
| 95 |
game,
|
| 96 |
functionality,
|
| 97 |
nlp_command,
|
| 98 |
-
|
| 99 |
token,
|
| 100 |
)
|
| 101 |
if isinstance(outp, str):
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
ais = {
|
| 27 |
+
"b_demo_hf": "stevez/ai",
|
| 28 |
+
"pgdemo2": "stevez/ai2",
|
| 29 |
+
"pgdemo_dev": "stevez/ai3",
|
| 30 |
}
|
| 31 |
|
| 32 |
clouddisks = {
|
|
|
|
| 39 |
print(f"identity: {identity}")
|
| 40 |
if not identity:
|
| 41 |
identity = "b_demo_hf"
|
| 42 |
+
ai = "stevez/ai"
|
| 43 |
if identity in ais:
|
| 44 |
ai = ais[identity]
|
| 45 |
clouddisk = "pgsoft/clouddisk"
|
|
|
|
| 61 |
global ai, clouddisk
|
| 62 |
if redirect is not None:
|
| 63 |
ai = redirect
|
|
|
|
| 64 |
|
| 65 |
if token is None or token == "":
|
| 66 |
return "please specify hf token"
|
|
|
|
| 94 |
game,
|
| 95 |
functionality,
|
| 96 |
nlp_command,
|
| 97 |
+
ai,
|
| 98 |
token,
|
| 99 |
)
|
| 100 |
if isinstance(outp, str):
|