-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
importing tensorflow not generating simple js output. #149
Comments
Hi @kallols, I see you are running this example in a browser. You cannot call imports in a browser since browsers don't support such imports. Instead of loading tfjs as TL;DR |
Thanks for your answer @manrajgrover now i have changed my js code to
} and in html i have written <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.7.0"> </script>and input type="button" onclick="go()" value="Display JS Array" still i am not getting any output. Could you please help me what to write in my js or html file because i couldn't instantiate tf if I need to do it then how ? |
@kallols you might be mixing in js and python code. We don't have
|
@manrajgrover @tafsiri Thanks, This is working fine. But I have one more query. I have created a pre-trained keras model and called the model inside the javascript. This model takes only array as input. So I need to convert the text coming as input to array format. I have a python function that does that using gensim package. |
@manrajgrover @tafsiri Thanks |
Hi,
When I am calling this tiny javascript code below in my html code:
function go(){
var array = new Array();
document.write("hello");
}
its giving correct ans, but when I am including tensorflow its not giving any output like below:
import * as tf from '@tensorflow/tfjs';
function go(){
var array = new Array();
document.write("hello");
}
please tell me why am I not getting any output and how to solve the issue.
The text was updated successfully, but these errors were encountered: