from flask import Flask, render_template, make_response, send_file from index import generate_map app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/map') def get_map(): res = send_file(generate_map(), mimetype='image/png') return res