<commit_before>from flask import Flask
# http://flask.pocoo.org/docs/0.10/patterns/appfactories/


def create_app(config_filename):
    app = Flask(__name__, static_folder='templates/static')
    app.config.from_object(config_filename)

    # For Dev purposes only can be removed in Production
    from flask import render_template, send_from_directory
    import os

    @app.route('/')
    def index():
        return render_template('index.html')

    @app.route('/<path:filename>')
    def file(filename):

        return send_from_directory(os.path.join(app.root_path, 'templates'), filename)

    # End

    from app.basemodels import db
    db.init_app(app)

    # Blueprints
    from app.comments.views import comments
    app.register_blueprint(comments, url_prefix='/api/v1/comments')
    from app.authors.views import authors
    app.register_blueprint(authors, url_prefix='/api/v1/authors')
    from app.posts.views import posts
    app.register_blueprint(posts, url_prefix='/api/v1/posts')

    return app
<commit_msg>remove from __init__<commit_after>from flask import Flask
# http://flask.pocoo.org/docs/0.10/patterns/appfactories/


def create_app(config_filename):
    app = Flask(__name__, static_folder='templates/static')
    app.config.from_object(config_filename)

    # For Dev purposes only can be removed in Production
    from flask import render_template, send_from_directory
    import os

    @app.route('/')
    def index():
        return render_template('index.html')

    @app.route('/<path:filename>')
    def file(filename):

        return send_from_directory(os.path.join(app.root_path, 'templates'), filename)

    # End

    from app.basemodels import db
    db.init_app(app)

    # Blueprints


    return app

{'fraction_non_alphanumeric': 0.10857142857142857, 'fraction_numerical': 0.005142857142857143, 'mean_word_length': 3.607894736842105, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3572778', 'n_tokens_mistral': 564, 'n_tokens_neox': 535, 'n_words': 116}