Skip to content

Instantly share code, notes, and snippets.

View gaborvecsei's full-sized avatar
🔬
Research in progress...

Gábor Vecsei gaborvecsei

🔬
Research in progress...
View GitHub Profile
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}"