Skip to content

Commit

Permalink
follow standard name for HF access token env name
Browse files Browse the repository at this point in the history
  • Loading branch information
bodaay committed Jul 19, 2023
1 parent 09639cc commit 1e15e02
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Storage path (optional) (default "Storage")
Number of LFS concurrent connections (optional) (default 5)

`-t, --token string`
HuggingFace Access Token, this can be automatically supplied by env variable 'HF_API_KEY' or .env file (recommended), required for some Models/Datasets, you still need to manually accept agreement if model requires it (optional)
HuggingFace Access Token, this can be automatically supplied by env variable 'HUGGING_FACE_HUB_TOKEN' or .env file (recommended), required for some Models/Datasets, you still need to manually accept agreement if model requires it (optional)

`-i, --install bool`
Install the binary to the OS default bin folder (if installPath not specified), Unix-like operating systems only
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.6
1.2.7
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/spf13/cobra"
)

const VERSION = "1.2.6"
const VERSION = "1.2.7"

func main() {
var (
Expand Down Expand Up @@ -79,7 +79,7 @@ func main() {

// Fetch token from command line flag or from .env file if not provided in flag
if HuggingFaceAccessToken == "" {
HuggingFaceAccessToken = os.Getenv("HF_API_KEY")
HuggingFaceAccessToken = os.Getenv("HUGGING_FACE_HUB_TOKEN")
}
fmt.Println("Branch:", branch)
fmt.Println("Storage:", storage)
Expand Down Expand Up @@ -113,7 +113,7 @@ func main() {

rootCmd.Flags().IntVarP(&numberOfConcurrentConnections, "concurrent", "c", 5, "Number of LFS concurrent connections (optional)")

rootCmd.Flags().StringVarP(&HuggingFaceAccessToken, "token", "t", "", "HuggingFace Access Token, this can be automatically supplied by env variable 'HF_API_KEY' or .env file, required for some Models/Datasets, you still need to manually accept agreement if model requires it (optional)")
rootCmd.Flags().StringVarP(&HuggingFaceAccessToken, "token", "t", "", "HuggingFace Access Token, this can be automatically supplied by env variable 'HUGGING_FACE_HUB_TOKEN' or .env file, required for some Models/Datasets, you still need to manually accept agreement if model requires it (optional)")

rootCmd.Flags().BoolVarP(&install, "install", "i", false, "Install the binary to the OS default bin folder, Unix-like operating systems only")

Expand Down

0 comments on commit 1e15e02

Please sign in to comment.