Skip to content

Commit 6c1937a

Browse files
committed
updating natural language classifier ids
1 parent a2ca265 commit 6c1937a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

examples/natural_language_classifier_v1.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@
1414
# with open('../resources/weather_data_train.csv', 'rb') as training_data:
1515
# print(json.dumps(natural_language_classifier.create(training_data=training_data, name='weather'), indent=2))
1616

17-
# replace 4f1704ex55-nlc-2432" with your classifier id
18-
status = natural_language_classifier.status('2374f9x68-nlc-2646')
17+
# replace 2374f9x68-nlc-2697 with your classifier id
18+
status = natural_language_classifier.status('2374f9x68-nlc-2697')
1919
print(json.dumps(status, indent=2))
20-
#
21-
classes = natural_language_classifier.classify('2374f9x68-nlc-2646', 'How hot will it be tomorrow?')
22-
print(json.dumps(classes, indent=2))
20+
21+
if status['status'] == 'Available':
22+
classes = natural_language_classifier.classify('2374f9x68-nlc-2697', 'How hot will it be tomorrow?')
23+
print(json.dumps(classes, indent=2))
24+
25+
# delete = natural_language_classifier.remove('2374f9x68-nlc-2697')
26+
# print(json.dumps(delete, indent=2))
2327

2428
# example of raising a WatsonException
2529
# print(json.dumps(natural_language_classifier.create(training_data='', name='weather3'), indent=2))

0 commit comments

Comments
 (0)