I figured it out. The simple solution is to change the Category data type which is returned by learn.predict to String.
JSONResponse({'result':learn.predict(img)[0]} to
JSONResponse({'result':str(learn.predict(img)[0])}
I figured it out. The simple solution is to change the Category data type which is returned by learn.predict to String.
JSONResponse({'result':learn.predict(img)[0]} to
JSONResponse({'result':str(learn.predict(img)[0])}