Open gjwgit opened 2 years ago
Have included a sentiment
command. This should work for the first two cases (also have included sent_text.txt
to be in the /.mlhub/
folder for testing purposes. Still need to fix some kinks with regard to stdin
and the working directory.
Thanks. Looks good. It is often useful to also include examples in the issue here so others can see what to expect:
$ ml sentiment hugging sent_text.txt
"I really like the new content of your book." , POSITIVE, 0.9998065829277039
"I’m not sure if I like the new design." , NEGATIVE, 0.9992893934249878
"The new design is awful." , NEGATIVE, 0.9998010993003845
This does not work for me though:
$ ml sentiment hugging What a beautiful day it is today.
usage: sentiment.py [-h] text
sentiment.py: error: unrecognized arguments: a beautiful day it is today.
Ah this is an interesting error. It works with quotes for my python script. so,
user@hubert:~/hugging$ /usr/bin/python3 /home/user/hugging/sentiment.py "What a beautiful day it is today"
What a beautiful day it is today , POSITIVE, 0.9998657703399658
However it does not work with the ml sentiment hugging
command. Will look into this.
Also the command should accept input from STDIN
$ ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864 | head -1 | ml sentiment hugging
Should be accepting inputs from stdin
now
A SENTIMENT command would be a useful addition.