Initialize
Initialize
Training Set and Classifier
Training Set and Classifier
getGenre function
getGenre function
In[]:=
getGenre[keyword_]:=c[keyword]
Create API
Create API
In[]:=
api=APIFunction[{"keyword""String""study"},getGenre[#keyword]&,"JSON"];api
Out[]=
APIFunction[{keywordStringstudy},getGenre[#keyword]&,JSON]
Deploy API to Wolfram Cloud
Deploy API to Wolfram Cloud
Note: append ?keyword=[keyword] to the end of the URL
In[]:=
ClearAll[cd];cd=CloudDeploy[api,"/get-genre/",Permissions"Public"]
Out[]=
In[]:=
api[<|"keyword""break"|>]
Out[]=
chill
In[]:=
api[]
Out[]=
chill