ysharma HF staff commited on
Commit
25be809
1 Parent(s): 9f8ef80

update api call bugfix

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -80,6 +80,7 @@ def create_search_index(repo_link, openai_api_key):
80
  def upload_files_to_space(repo_link, hf_token):
81
  print("***********INSIDE UPLOAD FILES TO SPACE***************")
82
  repo_name = repo_link.split('/')[-1]
 
83
  #Replacing the repo namein app.py
84
  with open("template/app_og.py", "r") as f:
85
  app = f.read()
 
80
  def upload_files_to_space(repo_link, hf_token):
81
  print("***********INSIDE UPLOAD FILES TO SPACE***************")
82
  repo_name = repo_link.split('/')[-1]
83
+ api = HfApi(token=hf_token)
84
  #Replacing the repo namein app.py
85
  with open("template/app_og.py", "r") as f:
86
  app = f.read()