coyotte508 commited on
Commit
31284e3
·
1 Parent(s): 6c006a2

Latest version of HF cli

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. build.sh +4 -2
Dockerfile CHANGED
@@ -16,7 +16,7 @@ RUN corepack enable \
16
  RUN pip install -U "huggingface_hub"
17
 
18
  # Install hfjs cli
19
- RUN npm install -g @huggingface/[email protected].2
20
 
21
  # Define a working directory
22
  WORKDIR /app
 
16
  RUN pip install -U "huggingface_hub"
17
 
18
  # Install hfjs cli
19
+ RUN npm install -g @huggingface/[email protected].4
20
 
21
  # Define a working directory
22
  WORKDIR /app
build.sh CHANGED
@@ -36,7 +36,9 @@ eval $BUILD_COMMAND
36
 
37
  echo "Build completed successfully, uploading the build output..."
38
 
39
- # Upload the build output to the Hugging Face space. Later use from-empty instead of --from-revision
40
- hfjs upload $HF_SPACE_NAME $OUTPUT_PATH $OUTPUT_PATH --from-revision main --repo-type space --revision refs/convert/build --token $HF_TOKEN
 
 
41
 
42
  echo "Build and upload completed successfully."
 
36
 
37
  echo "Build completed successfully, uploading the build output..."
38
 
39
+ # Upload the build output to the Hugging Face space. Later use --empty instead of --revision
40
+ # Those commands use the HF_TOKEN in the environment
41
+ hfjs create-branch $HF_SPACE_NAME refs/convert/build --repo-type space --revision main
42
+ hfjs upload $HF_SPACE_NAME $OUTPUT_PATH $OUTPUT_PATH --repo-type space --revision refs/convert/build
43
 
44
  echo "Build and upload completed successfully."