Closed jduran0322 closed 4 days ago
@jduran0322 You need to use ESM library like https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@4.22.0/dist/tf.fesm.js
to import it in the Business Text panel.
Generic JS version won't work.
Thank you very much for your help, it does indeed work correctly with the ESM version of TensorFlow
@jduran0322 Thank you for confirming.
Documentation updated: https://volkovlabs.io/plugins/business-text/external/#tensorflow
Problem Description: I am trying to use TensorFlow.js with the Business Text plugin in Grafana. Despite following the examples and suggestions provided in the plugin's documentation, I have not been able to get the library to load correctly and be available in my code.
Plugin documentation: https://volkovlabs.io/plugins/business-text/external/
The console shows the following error: Uncaught (in promise) TypeError: tf.ready is not a function
Expected Behavior: I expect TensorFlow.js to load correctly and for the tf object to be available for use in my JavaScript code.
Current Behavior: The tf object is not defined after loading the tf.min.js file. I have tried loading the library both from a local file in the public folder and from a CDN, but I continue to encounter errors related to the definition of the tf object.
Additional Details
Grafana version: 11.2.4 OSS
Grafana environment: Docker, image grafana/grafana:11.2.4-ubuntu
I would appreciate any help or suggestions to resolve this issue, especially if someone has done something similar or knows the correct way to do it.