Spaces:
Running
Running
fix: hf token
Browse files
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=
|
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,
|