英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论