允许用户在运行中的Streamlit应用程序上更新秘密?

huangapple go评论75阅读模式
英文:

Allow users to update secrets on a running Streamlit app?

问题

我想启动一个公开的Streamlit应用程序,该应用程序使用Google文本转语音和OpenAI API。我真正想做的是让用户插入他们自己的API密钥以供应用程序使用。

有没有办法做到这一点?到目前为止,我最好的解决方案是让每个用户从GitHub克隆应用程序,然后使用自己的机密部署它。

英文:

I want to launch a public Streamlit app which uses Google Text-to-Speech and OpenAI API. What I would really want to do is to let users insert their API keys to be used with the app.

Is there a way to do that? So far the best solution I have is to have each user clone the app from GitHub and then deploy it with its own secrets

答案1

得分: 1

很抱歉,目前还没有办法让应用的最终用户设置秘密。在这个时候,最佳的替代方法是创建一个 st.text_input 字段,以允许用户输入他们自己的API密钥。

英文:

Unfortunately, there isn't currently a way to allow end users of the app to set secrets. The best alternative at this point in time is to create a st.text_input field to allow users to input their own API key.

huangapple
  • 本文由 发表于 2023年5月28日 21:51:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/76351815.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定