<commit_before>var all_models = {{ all_models }};
var modelid = "{{ modelid }}";
var modeltype = "{{ modeltype }}";
var elementid = "{{ elementid }}";
console.log(modelid, modeltype, elementid);
Bokeh.load_models(all_models);
var model = Bokeh.Collections(modeltype).get(modelid);
window.model = model;
var view = new model.default_view({model: model});
window.view = view;
_.delay(function() {
    $('#{{ elementid }}').append(view.$el);
}, 1000);<commit_msg>Don't delay but render view's contents to an existing DOM element<commit_after>var all_models = {{ all_models }};
var modelid = "{{ modelid }}";
var modeltype = "{{ modeltype }}";
var elementid = "{{ elementid }}";
console.log(modelid, modeltype, elementid);
Bokeh.load_models(all_models);
var model = Bokeh.Collections(modeltype).get(modelid);
var view = new model.default_view({model: model, el: '#{{ elementid }}'});
{'fraction_non_alphanumeric': 0.1820250284414107, 'fraction_numerical': 0.004550625711035267, 'mean_word_length': 6.2727272727272725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7214282', 'n_tokens_mistral': 291, 'n_tokens_neox': 285, 'n_words': 67}