wsj1995 commited on
Commit
ae467ac
·
1 Parent(s): ef0cccb

fix: hf token

Browse files
Files changed (1) hide show
  1. api.py +1 -1
api.py CHANGED
@@ -67,7 +67,7 @@ async def upload_file(userId: str, modelId: str, filename: str, file: UploadFile
67
  buffer.write(await file.read())
68
  callback(modelId,'UPLOADING')
69
  pathInRepo = f"{userId}/{filename}"
70
- huggingfaceApi = HfApi(token=api_token)
71
  huggingfaceApi.upload_file(
72
  path_or_fileobj=file_location,
73
  path_in_repo=pathInRepo,
 
67
  buffer.write(await file.read())
68
  callback(modelId,'UPLOADING')
69
  pathInRepo = f"{userId}/{filename}"
70
+ huggingfaceApi = HfApi(token=HUGGINGFACE_API_TOKEN)
71
  huggingfaceApi.upload_file(
72
  path_or_fileobj=file_location,
73
  path_in_repo=pathInRepo,