<commit_before>import logging
import os
from project.application import create_app
from project.bl import init_resource_registry
from project.models import PageChunk

init_resource_registry()
app = create_app()





@app.context_processor
def inject_pagechunks():
    chunks = {chunk.name: chunk.text for chunk in PageChunk.query.all()}
    return {"pagechunks": chunks}


# noinspection PyUnusedLocal
@app.errorhandler(413)
def request_entity_too_large(error):
    return 'File Too Large', 413

if os.environ.get("WERKZEUG_RUN_MAIN") == "true":
    logging.info(app.url_map)<commit_msg>Fixing Heroku static serving bug<commit_after>import logging
import os
from project.application import create_app
from project.bl import init_resource_registry
from project.models import PageChunk

init_resource_registry()
app = create_app()


@app.context_processor
def inject_pagechunks():
    chunks = {chunk.name: chunk.text for chunk in PageChunk.query.all()}
    return {"pagechunks": chunks}


# noinspection PyUnusedLocal
@app.errorhandler(413)
def request_entity_too_large(error):
    return 'File Too Large', 413

if os.environ.get("WERKZEUG_RUN_MAIN") == "true":
    logging.info(app.url_map)
{'fraction_non_alphanumeric': 0.0957983193277311, 'fraction_numerical': 0.010084033613445379, 'mean_word_length': 5.767045454545454, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '2087250', 'n_tokens_mistral': 380, 'n_tokens_neox': 367, 'n_words': 95}