<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def interactive():
 """Interactive classifier."""

    global n
    if request.method == 'GET' and request.args.get('heartbeat', '') != "":
        return request.args.get('heartbeat', '')
    if request.method == 'POST':
        logging.warning('POST to /interactive is deprecated. '
                        'Use /worker instead')
    else:
        # Page where the user can enter a recording
        return render_template('canvas.html')