broadfield commited on
Commit
8fad386
·
verified ·
1 Parent(s): d1c093b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -155,7 +155,8 @@ def build_space(repo_name,file_name,file_content,access_token=""):
155
  f.close()
156
  # Upload a local file to the Space
157
  commit_message = "Adding file test: "+str(uuid.uuid4())
158
- api.upload_file(local_file_path, repo_id=repo_path, path_in_repo=file_name, commit_message=commit_message)
 
159
  print("File uploaded successfully.")
160
  # Commit changes
161
  commit_message += "\nInitial commit to the repository."+ local_file_path
 
155
  f.close()
156
  # Upload a local file to the Space
157
  commit_message = "Adding file test: "+str(uuid.uuid4())
158
+
159
+ api.upload_file(path_or_fileobj=local_file_path, path_in_repo=file_name, repo_id=repo_path, repo_type='space', commit_message=commit_message)
160
  print("File uploaded successfully.")
161
  # Commit changes
162
  commit_message += "\nInitial commit to the repository."+ local_file_path