Flask Web应用程序在Web浏览器中将数据输出到新的HTML页面

2024-04-29 03:44:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个PythonFlask web应用程序,它使用plotly的dash应用程序上传CSV/txt文件,并使用Pandas评测进行处理。在我的本地服务器上,一切都很好,但一旦我将其发布到Azure Web app,它就不再生成新的HTML文件并显示分析结果。当在本地完成时,HTML确实在HTML文件中有我的本地驱动器地址位置,但不确定如何为在线web应用修复此位置

请看下面我的代码。不确定我需要什么来允许web应用程序生成带有结果的新HTML页面

profile = ProfileReport(
        df.sample(n=100000, replace=True), title='Pandas Profiling Report Results: [ ' + filename + ' ]', explorative=True) 

profile.to_file(output_file="Profiling_Report_Results.html")

webbrowser.open("Profiling_Report_Results.html", new=2)

Tags: 文件reportwebtrue应用程序pandashtmlplotly