<commit_before>import os
import markdown
from api_access import get_songs
from flask import Flask, render_template, request
from flask import Markup
from my_app import app, api_access


@app.route('/', methods=['GET', 'POST'])
def index():
    if request.method == 'POST':
        search_term = request.form['search_term']
        sort_type = request.form['sort_type']
        song_list = get_songs(api_access.GENRE, sort_type, search_term)
        return render_template('results.html', song_list=song_list)
    return render_template('search.html')


@app.route('/list/<search_term>/<sort_type>', methods=['POST', 'GET'])
def show_results(search_term, sort_type):
    if request.method == 'POST':
        search_term = request.form['search_term']
        sort_type = request.form['sort_type']
        song_list = get_songs(api_access.GENRE, sort_type, search_term)
        return render_template('results.html', song_list=song_list)
    song_list = get_songs(api_access.GENRE, sort_type, search_term)
    return render_template('results.html', song_list=song_list)


@app.route('/about')
def show_about():
    with open('README.md') as f:
        readme = Markup(markdown.markdown(f.read()))
        print readme
    return render_template('about.html', readme=readme)<commit_msg>Removed print statment<commit_after>import os
import markdown
from api_access import get_songs
from flask import Flask, render_template, request
from flask import Markup
from my_app import app, api_access


@app.route('/', methods=['GET', 'POST'])
def index():
    if request.method == 'POST':
        search_term = request.form['search_term']
        sort_type = request.form['sort_type']
        song_list = get_songs(api_access.GENRE, sort_type, search_term)
        return render_template('results.html', song_list=song_list)
    return render_template('search.html')


@app.route('/list/<search_term>/<sort_type>', methods=['POST', 'GET'])
def show_results(search_term, sort_type):
    if request.method == 'POST':
        search_term = request.form['search_term']
        sort_type = request.form['sort_type']
        song_list = get_songs(api_access.GENRE, sort_type, search_term)
        return render_template('results.html', song_list=song_list)
    song_list = get_songs(api_access.GENRE, sort_type, search_term)
    return render_template('results.html', song_list=song_list)


@app.route('/about')
def show_about():
    with open('README.md') as f:
        readme = Markup(markdown.markdown(f.read()))
    return render_template('about.html', readme=readme)
{'fraction_non_alphanumeric': 0.12774294670846395, 'fraction_numerical': 0.0, 'mean_word_length': 4.562091503267974, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '865248', 'n_tokens_mistral': 824, 'n_tokens_neox': 804, 'n_words': 169}