What if tool as a stand alone object

67 views
Skip to first unread message

Albin Thomas

unread,
May 19, 2021, 9:56:24 AM5/19/21
to What-If Tool
How can I invoke what if tool as a stand alone object without having to invoke the object through the whole code in jupyter notebook. Can you please help me out with some tutorial to follow on how to do it?
Thank you for the help

jwe...@google.com

unread,
May 19, 2021, 10:19:08 AM5/19/21
to What-If Tool
The What-If Tool is meant to be used either in notebooks or through TensorBoard. It is technically possible to have it as a standalone webapp but would require lots of surrounding glue code that isn't documented. We actually do this for our web demos (see them at https://pair-code.github.io/what-if-tool/explore/#web) with the code in https://github.com/PAIR-code/what-if-tool/tree/master/wit_dashboard/demo.

For the UCI census demo, see files https://github.com/PAIR-code/what-if-tool/blob/master/wit_dashboard/demo/index.html and https://github.com/PAIR-code/what-if-tool/blob/master/wit_dashboard/demo/wit-demo.html (and the compilation rule in https://github.com/PAIR-code/what-if-tool/blob/master/wit_dashboard/demo/BUILD). In that case, we actually run a tensorflow.js model right in the browser, as opposed to calling into a python backend to run the model, but you could have the JS code that runs the model instead call to your webapp backend to run predictions and return results.

But since this isn't a fully supported use-case, we don't have full documentation and tutorials around it. Are you instead able to run your What-If Tool through TensorBoard if you aren't interested in using a notebook environment?

Reply all
Reply to author
Forward
0 new messages