Create Login Dialog

#3
by ferrywuai - opened

I used the following method to provide API token to the chatbot in my local environment.

  • Login with hf auth login
  • Define HF_TOKEN in environment variable

But I failed to do the same thing in hugging face space.

  • Even thought I logged in hugging face, the chatbot in hugging face space cannot get API token.
  • If I defined HF_TOKEN in secrets of hugging face space, everyone runs the chatbot by my API token.
    I don't think that's a good practice.

Therefore, create a login dialog to provide API token before users can use the chatbot.

ferrywuai changed pull request status to open
ferrywuai changed pull request status to merged

Sign up or log in to comment