Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def verify_organization_access(organization: str, token: str) -> bool:
|
|
46 |
except Exception as e:
|
47 |
logger.error(f"No write access to organization {organization}: {str(e)}")
|
48 |
return False
|
49 |
-
def build_space(repo_name,file_name,file_content,access_token=""):
|
50 |
try:
|
51 |
repo_path=user_+str(repo_)
|
52 |
access_token=os.environ['HF_TOKEN']
|
@@ -76,7 +76,7 @@ def build_space(repo_name,file_name,file_content,access_token=""):
|
|
76 |
return [{'role':'assistant','content': commit_message+'\nCommit Success' }]
|
77 |
except Exception as e:
|
78 |
print("ERROR ",e)
|
79 |
-
return [{'role':'assistant','content': 'There was an Error: ' + str(e)}]
|
80 |
|
81 |
@app.route('/create-space', methods=['POST'])
|
82 |
def create_hf_space():
|
|
|
46 |
except Exception as e:
|
47 |
logger.error(f"No write access to organization {organization}: {str(e)}")
|
48 |
return False
|
49 |
+
'''def build_space(repo_name,file_name,file_content,access_token=""):
|
50 |
try:
|
51 |
repo_path=user_+str(repo_)
|
52 |
access_token=os.environ['HF_TOKEN']
|
|
|
76 |
return [{'role':'assistant','content': commit_message+'\nCommit Success' }]
|
77 |
except Exception as e:
|
78 |
print("ERROR ",e)
|
79 |
+
return [{'role':'assistant','content': 'There was an Error: ' + str(e)}]'''
|
80 |
|
81 |
@app.route('/create-space', methods=['POST'])
|
82 |
def create_hf_space():
|