Query fail when reading token from file contain newline char
cifvts opened this issue · comments
Andrea Agosti commented
If the token is read from $HF_HOME/token
, the config might read also the ned of line character, that will cause the curl query to fail.
A possible solution to the issue:
api_token = string.gsub(f:read("*a"), "[\n\r]", "")
Luc Georges commented
Hi @cifvts, thanks for reporting this bug. Could you submit a PR with the fix?