So far I'm not aware of anyone building WIT directly into a client-facing web app, with the exception of our own web demo code for the WIT website itself (although I'm hopeful for more of these uses in the future).
You could follow the same code we have for our WIT website demos to accomplish the same. Basically, we wrap the wit-dashboard Polymer element in a custom element that contains all the code for responding to events from WIT, such as for loading the test data and querying the model, and then passes the results to WIT. In our demos, that code loads the data from json and does the model inference directly in javascript using TensorFlow.js, but that code could instead make calls to a backend server to do that work.
Things to notice:
- wit-dashboard is created with local=true and with placeholder, non-empty model-name and inference-address attributes. This is so we can get javascript events to drive the data/model steps, instead of WIT itself trying to call into the TensorBoard backend for this information.
- all the addEventListener calls are for listening for events from WIT that require this wrapper to do something and then call back to WIT with results, either by setting a WIT attribute or calling a WIT function.
Check it out and let me know what questions come up.