You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I started working with fasttext-node and I wrote the following script in Typescript:
import*asFastTextfrom'fasttext-node'asyncfunctionmain(){constfastext=newFastText({logs: true})try{consttrainResult=awaitfastext.train('./train.txt',{epoch: 50,model: 'my-training-model'})constresult=awaitfastext.predict(['Custard Pudding tasting like raw eggs'],{labelCount: 10})}catch(err){console.log('Training data err',err)}}// execute the codemain();
The train.txt file is the same from the examples, and I hosted it on my local folder.
Issue 1
When I change the path of train.txt to https://raw.githubusercontent.com/jazzyarchitects/fasttext-node/master/train.txt, I get the following error:
Issue 2
When I execute the piece of code I wrote, I get the following error:
I like the way the API has been implemented, and I would really like to use this library. Please help me get it working
The text was updated successfully, but these errors were encountered:
Also I would suggest you to terminate the process after the main function has returned. For that return any value from main function and the in the resolve section, exit the process.
main().then(()=>process.exit(0));
When you provide a URL to the train function, it downloads the file and writes the data to data.txt file. Maybe you don't have permission to write to that location.
Today I started working with fasttext-node and I wrote the following script in Typescript:
The
train.txt
file is the same from the examples, and I hosted it on my local folder.Issue 1
When I change the path of
train.txt
tohttps://raw.githubusercontent.com/jazzyarchitects/fasttext-node/master/train.txt
, I get the following error:Issue 2
When I execute the piece of code I wrote, I get the following error:
I like the way the API has been implemented, and I would really like to use this library. Please help me get it working
The text was updated successfully, but these errors were encountered: