<commit_before>import os
from pywps.app.Service import Service

from .processes import processes


def application(environ, start_response):
    app = create_app()
    return app(environ, start_response)


def create_app(cfgfiles=None):
    config_files = [os.path.join(os.path.dirname(__file__), 'default.cfg')]
    if cfgfiles:
        config_files.extend(cfgfiles)
    if 'PYWPS_CFG' in os.environ:
        config_files.append(os.environ['PYWPS_CFG'])
    service = Service(processes=processes, cfgfiles=config_files)
    return service<commit_msg>Fix #240: wsgi app init<commit_after>import os
from pywps.app.Service import Service

from .processes import processes


def create_app(cfgfiles=None):
    config_files = [os.path.join(os.path.dirname(__file__), 'default.cfg')]
    if cfgfiles:
        config_files.extend(cfgfiles)
    if 'PYWPS_CFG' in os.environ:
        config_files.append(os.environ['PYWPS_CFG'])
    service = Service(processes=processes, cfgfiles=config_files)
    return service


application = create_app()
{'fraction_non_alphanumeric': 0.10541586073500966, 'fraction_numerical': 0.0029013539651837525, 'mean_word_length': 4.476190476190476, 'pattern_counts': {'":': 0, '<': 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': '1507713', 'n_tokens_mistral': 337, 'n_tokens_neox': 335, 'n_words': 69}