<commit_before>"""
The flask application package.
"""
import logging
import json
import os
from flask import Flask
from frontui.data import DataProvider
from frontui.models import ObjectInfo, ChecklistInfo
# create an application
app = Flask(__name__)
# set prod logging
MODE = os.environ.get('APP_MODE', 'DEBUG')
if MODE == 'PROD':
    logging.basicConfig(filename='app.log', format='%(asctime)s %(message)s', level=logging.DEBUG)
    logging.debug('Starting app in %s mode' % MODE)
else:
    app.debug_log_format = '%(asctime)s %(levelname)s %(message)s'
    app.logger.setLevel(logging.DEBUG)
# create data provider
DATA = DataProvider()
# fill data from files
#with open('./app_data/objects.json', 'r') as objects_file:
#    for item in json.load(objects_file):
#        DATA.add_object(ObjectInfo(item))
#with open('./app_data/checklist.json', 'r') as checklist_file:
#    DATA.checklist = ChecklistInfo.from_json(json.load(checklist_file))

import frontui.views
<commit_msg>Fix #4<commit_after>"""
The flask application package.
"""
import logging
import json
import os
from flask import Flask
from frontui.data import DataProvider
from frontui.models import ObjectInfo, ChecklistInfo
# create an application
app = Flask(__name__)
# set prod logging
#MODE = os.environ.get('APP_MODE', 'DEBUG')
#if MODE == 'PROD':
#    logging.basicConfig(filename='app.log', format='%(asctime)s %(message)s', level=logging.DEBUG)
#    logging.debug('Starting app in %s mode' % MODE)
#else:
#    app.debug_log_format = '%(asctime)s %(levelname)s %(message)s'
#    app.logger.setLevel(logging.DEBUG)
# create data provider
DATA = DataProvider()
# fill data from files
#with open('./app_data/objects.json', 'r') as objects_file:
#    for item in json.load(objects_file):
#        DATA.add_object(ObjectInfo(item))
#with open('./app_data/checklist.json', 'r') as checklist_file:
#    DATA.checklist = ChecklistInfo.from_json(json.load(checklist_file))

import frontui.views

{'fraction_non_alphanumeric': 0.1377551020408163, 'fraction_numerical': 0.0005102040816326531, 'mean_word_length': 5.325806451612904, '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': '3666516', 'n_tokens_mistral': 646, 'n_tokens_neox': 637, 'n_words': 165}