dog_breeds_web_app/util.py
def embed_png2html(figdata_png):
    """
    Convert the data to base64 format before the PNG data can be embedded in HTML
    Parameters:
        plt_fig: matplotlib figure
    Return:
        figdata_png: base64 encoding images
    """
    figdata_png = base64.b64encode(figdata_png)
    figdata_png = figdata_png.decode('utf-8') # base64.b64encode return byte
    return figdata_png

    Convert the data to base64 format before the PNG data can be embedded in HTML
    Parameters:
        plt_fig: matplotlib figure
    Return:
        figdata_png: base64 encoding images
    
Convert the data to base64 format before the PNG data can be embedded in HTML
Convert the data to base64 format before the PNG data can be embedded in HTML
def embed_png2html(figdata_png):
    figdata_png = base64.b64encode(figdata_png)
    figdata_png = figdata_png.decode('utf-8') 
    return figdata_png
def embed_png2html ( figdata_png ) : figdata_png = base64 . b64encode ( figdata_png ) figdata_png = figdata_png . decode ( 'utf-8' ) return figdata_png
Convert the data to base64 format before the PNG data can be embedded in HTML
Convert the data to base64 format before the PNG data can be embedded in HTML
"""
    Convert the data to base64 format before the PNG data can be embedded in HTML
    Parameters:
        plt_fig: matplotlib figure
    Return:
        figdata_png: base64 encoding images
    """ # base64.b64encode return byte
figdata_png
plt_fig
None