Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -144,8 +144,8 @@ def parse_json(inp):
|
|
144 |
def build_space(repo_name,file_name,file_content,access_token=""):
|
145 |
try:
|
146 |
repo_path=user_+str(repo_)
|
|
|
147 |
if not access_token:
|
148 |
-
access_token=os.environ['HF_TOKEN']
|
149 |
return [{'role':'assistant','content': 'ENTER A HUGGINGFACE TOKEN'}]
|
150 |
api=HfApi(endpoint="https://huggingface.co", token=access_token)
|
151 |
repo_url = api.create_repo(
|
|
|
144 |
def build_space(repo_name,file_name,file_content,access_token=""):
|
145 |
try:
|
146 |
repo_path=user_+str(repo_)
|
147 |
+
access_token=os.environ['HF_TOKEN']
|
148 |
if not access_token:
|
|
|
149 |
return [{'role':'assistant','content': 'ENTER A HUGGINGFACE TOKEN'}]
|
150 |
api=HfApi(endpoint="https://huggingface.co", token=access_token)
|
151 |
repo_url = api.create_repo(
|