Beracles
commited on
Commit
·
89a35b5
1
Parent(s):
77e6d08
fix global variable
Browse files
app.py
CHANGED
|
@@ -36,12 +36,13 @@ clouddisks = {
|
|
| 36 |
}
|
| 37 |
|
| 38 |
identity = os.environ.get("identity")
|
|
|
|
| 39 |
if not identity:
|
| 40 |
identity = "b_demo_hf"
|
| 41 |
ai = "stevez-ai"
|
| 42 |
if identity in ais:
|
| 43 |
ai = ais[identity]
|
| 44 |
-
clouddisk = "clouddisk"
|
| 45 |
if identity in clouddisks:
|
| 46 |
clouddisk = clouddisks[identity]
|
| 47 |
|
|
@@ -57,7 +58,7 @@ def run(hf_token, service, game, functionality, nlp_command):
|
|
| 57 |
user_name = "__fake__"
|
| 58 |
|
| 59 |
# redirect all traffic to the proxy sever
|
| 60 |
-
global ai
|
| 61 |
if redirect is not None:
|
| 62 |
ai = redirect
|
| 63 |
ai_url = f"https://{ai}.hf.space"
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
identity = os.environ.get("identity")
|
| 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"
|
| 46 |
if identity in clouddisks:
|
| 47 |
clouddisk = clouddisks[identity]
|
| 48 |
|
|
|
|
| 58 |
user_name = "__fake__"
|
| 59 |
|
| 60 |
# redirect all traffic to the proxy sever
|
| 61 |
+
global ai, clouddisk
|
| 62 |
if redirect is not None:
|
| 63 |
ai = redirect
|
| 64 |
ai_url = f"https://{ai}.hf.space"
|