Search code examples
pythondjangotensorflowwebartificial-intelligence

can I use .h5 file in Django project?


I'm making AI web page using Django and tensor flow. and I wonder how I add .h5 file in Django project.

writing whole code in views.py file but I want to use pre-trained model not online learning in webpage.


Solution

  • Yeah u can use .h5 file in django. You can use h5py for operations on .h5 files. Exapmle -

    import h5py
    
    filename = "filename.h5"
    
    h5 = h5py.File(filename,'r')
    
    # logic
    ...
    
    h5.close()