UPDATE:
I’ve been trying to implement the same thing @samirak93 did but it didn’t work.
I got 500: Internal Server Error
which was cause by nodejs as mentioned in the following error message in heroku logs. I tried to add nodejs in the requirements.txt file and still no success
2020-01-25T09:39:23.794218+00:00 app[web.1]: Traceback (most recent call last):
2020-01-25T09:39:23.794228+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/tornado/web.py", line 1469, in _execute
2020-01-25T09:39:23.794232+00:00 app[web.1]: result = yield result
2020-01-25T09:39:23.794234+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/tornado/gen.py", line 1015, in run
2020-01-25T09:39:23.794236+00:00 app[web.1]: value = future.result()
2020-01-25T09:39:23.794247+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/tornado/concurrent.py", line 237, in result
2020-01-25T09:39:23.794250+00:00 app[web.1]: raise_exc_info(self._exc_info)
2020-01-25T09:39:23.794252+00:00 app[web.1]: File "<string>", line 3, in raise_exc_info
2020-01-25T09:39:23.794254+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/tornado/gen.py", line 1024, in run
2020-01-25T09:39:23.794256+00:00 app[web.1]: yielded = self.gen.send(value)
2020-01-25T09:39:23.794259+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/types.py", line 208, in send
2020-01-25T09:39:23.794261+00:00 app[web.1]: return self.__wrapped.send(val)
2020-01-25T09:39:23.794263+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/server/views/doc_handler.py", line 61, in get
2020-01-25T09:39:23.794266+00:00 app[web.1]: template_variables=session.document.template_variables)
2020-01-25T09:39:23.794276+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/embed/server.py", line 227, in server_html_page_for_session
2020-01-25T09:39:23.794278+00:00 app[web.1]: bundle = bundle_for_objs_and_resources(None, resources)
2020-01-25T09:39:23.794280+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/embed/bundle.py", line 184, in bundle_for_objs_and_resources
2020-01-25T09:39:23.794282+00:00 app[web.1]: ext = bundle_models(models)
2020-01-25T09:39:23.794284+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/util/compiler.py", line 338, in bundle_models
2020-01-25T09:39:23.794287+00:00 app[web.1]: _bundle_cache[key] = bundle = _bundle_models(custom_models)
2020-01-25T09:39:23.794289+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/util/compiler.py", line 551, in _bundle_models
2020-01-25T09:39:23.794291+00:00 app[web.1]: custom_impls = _compile_models(custom_models)
2020-01-25T09:39:23.794293+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/util/compiler.py", line 528, in _compile_models
2020-01-25T09:39:23.794295+00:00 app[web.1]: compiled = nodejs_compile(impl.code, lang=impl.lang, file=impl.file)
2020-01-25T09:39:23.794297+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/util/compiler.py", line 111, in nodejs_compile
2020-01-25T09:39:23.794299+00:00 app[web.1]: output = _run_nodejs([compilejs_script], dict(code=code, lang=lang, file=file, bokehjs_dir=bokehjs_dir))
2020-01-25T09:39:23.794302+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/util/compiler.py", line 475, in _run_nodejs
2020-01-25T09:39:23.794304+00:00 app[web.1]: return _run(_nodejs_path(), argv, input)
2020-01-25T09:39:23.794306+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/util/compiler.py", line 451, in _nodejs_path
2020-01-25T09:39:23.794308+00:00 app[web.1]: _nodejs = _detect_nodejs()
2020-01-25T09:39:23.794310+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/bokeh/util/compiler.py", line 443, in _detect_nodejs
2020-01-25T09:39:23.794312+00:00 app[web.1]: '("conda install nodejs" or follow https://nodejs.org/en/download/)')
2020-01-25T09:39:23.794322+00:00 app[web.1]: RuntimeError: node.js v6.10.0 or higher is needed to allow compilation of custom models ("conda install nodejs" or follow https://nodejs.org/en/download/)
2020-01-25T09:39:23.795169+00:00 app[web.1]: 2020-01-25 09:39:23,795 500 GET /myapp (78.XX.XXXX.XXX) 244.84ms