3

I have a python Flask web app that using plotly's dash app to upload CSV/txt files to be processed using Pandas Profiling. Everything works great on my local server but once I publish it to Azure Web app it no longer produces the new HTML file with the Pandas profiling results. The HTML does have my local drive address location to the HTML file when done locally but not sure how to fix this for an online web app.

Please see my code below. Not sure what I need to allow the web app to produce the new HTML page with the results.

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)
jodood
  • 51
  • 3
  • Have you released the source code for your Python Flash web app? I have a need for something like this also, to make the pandas-profiling available to non-developers through a web browser interface. – Steve May 19 '21 at 14:57
  • I ended up sending the HTML file to Azure blob storage and generating a SAS url to allow the user to download the results. It seems like you need to stage the file somewhere and allow them to download it since a lot of these libraries store it locally on your pc. It works great for me. not sure if there are better alternatives. – jodood May 20 '21 at 15:04

0 Answers0