I need to make the following curl command within a python program. This trains a classifier.
curl -i --user "{username}":"{password}" -F training_data=@{path_to_file}/weather_data_train.csv -F training_metadata="{\"language\":\"en\",\"name\":\"TutorialClassifier\"}" "https://gateway.watsonplatform.net/natural-language-classifier/api/v1/classifiers"
After that, I need my program to make another curl command which queries the previously trained classifier. This query returns some results that I need my program to be able to access and use
curl --user "{username}":"{password}" "https://gateway.watsonplatform.net/natural-language-classifier/api/v1/classifiers/{classifier_id}"
Just entering these commands manually in the terminal works but I need to automate the process using a python or java program . Thanks for any help!