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