Last active
December 23, 2018 09:22
-
-
Save dice89/abe836cff39d22ea8f5ff6af435df53b to your computer and use it in GitHub Desktop.
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
from flask import Flask, send_file, make_response, | |
from plot import do_plot | |
app = Flask(__name__) | |
@app.route('/plots/breast_cancer_data/correlation_matrix', methods=['GET']) | |
def correlation_matrix(): | |
bytes_obj = do_plot() | |
return send_file(bytes_obj, | |
attachment_filename='plot.png', | |
mimetype='image/png') | |
if __name__ == '__main__': | |
app.run(debug=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment