Open sumitdua10 opened 6 years ago
Hi @sumitdua10
I have updated the Notebook. There are some changes with the latest version of the Watson Developer Cloud. So instead of !pip install --upgrade watson-developer-cloud
change to !pip install watson-developer-cloud==1.5
. It should work :)
I ran the code but it gave error - responsejson is not subscriptable.
I updated the last line of function analyze_using_NLU(text_content) which resolved the issue
Existing Line: return response
Updated Line: return response.get_result() def analyze_using_NLU(text_content): ''' Call Watson Natural Language Understanding service to obtain analysis results. ''' response = natural_language_understanding.analyze( text= text_content, features=Features( entities=EntitiesOptions(), relations=RelationsOptions(), keywords= KeywordsOptions()) ) return response.get_result()