This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = load_model("/random_forest_model.pkl") | |
try: | |
sepal_length, sepal_width, petal_length, petal_width = parse_comment_input(args.issue_comment_body) | |
predicted_class_id = make_prediction(model, sepal_length, sepal_width, petal_length, petal_width) | |
predicted_class_name = map_class_id_to_name(predicted_class_id) | |
reply_message = f"Hey @{args.issue_user}!<br>This was your input: {args.issue_comment_body}.<br>The prediction: **{predicted_class_name}**" | |
except Exception as e: | |
reply_message = f"Hey @{args.issue_user}! There was a problem with your input. The error: {e}" |
OlderNewer