简体   繁体   English

Open() function 同时部署 streamlit 应用程序

[英]Open() function while deploying streamlit app

I get an error of no such file or directory while am deploying a streamlit app to streamlit cloud share, what could be the problem, i have all files in the same directory and as a standalone the app works perfectly the error comes only when am deploying the app, i need help在将 streamlit 应用程序部署到 streamlit 云共享时,我收到没有这样的文件或目录的错误,这可能是什么问题,我将所有文件都放在同一目录中,并且作为一个独立的应用程序,该应用程序可以完美运行,只有在部署时才会出现错误应用程序,我需要帮助

Loaded_model = pickle.load(open(filepath here/savfile) Loaded_model = pickle.load(打开(这里的文件路径/savfile)

The files in a Streamlit app are stored in a folder called app – as a result, you'll usually need to adjust the file paths when you're deploying an app that you were previously running locally. Streamlit 应用程序中的文件存储在名为app的文件夹中——因此,在部署之前在本地运行的应用程序时,您通常需要调整文件路径。 I'd recommend doing os.getcwd() to return the file path and confirm that your file paths are correct.我建议执行os.getcwd()以返回文件路径并确认您的文件路径正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM