Spaces:
Running
Running
Tu Nombre commited on
Commit ·
9390027
1
Parent(s): 5f109e4
fix hf_token_repo
Browse files
main.py
CHANGED
|
@@ -997,6 +997,7 @@ async def oauth_callback(code: str, state: str):
|
|
| 997 |
(os.environ.get("HF_TOKEN_3",""), os.environ.get("HF_USER_3","Cristobal288")),
|
| 998 |
]
|
| 999 |
user_repo = space_repo.split("/")[0]
|
|
|
|
| 1000 |
token_data = dict(token)
|
| 1001 |
token_data["client_id"] = cli_id
|
| 1002 |
token_data["client_secret"] = cli_sec
|
|
|
|
| 997 |
(os.environ.get("HF_TOKEN_3",""), os.environ.get("HF_USER_3","Cristobal288")),
|
| 998 |
]
|
| 999 |
user_repo = space_repo.split("/")[0]
|
| 1000 |
+
hf_token_repo = next((t for t,u in cuentas if u.lower()==user_repo.lower()), HF_TOKEN)
|
| 1001 |
token_data = dict(token)
|
| 1002 |
token_data["client_id"] = cli_id
|
| 1003 |
token_data["client_secret"] = cli_sec
|