Created
March 15, 2020 09:34
-
-
Save gaborvecsei/d5836136a8b32391d9f490064f701643 to your computer and use it in GitHub Desktop.
This file contains 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}" | |
print(f"::set-output name=issue_comment_reply::{reply_message}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment