# Path: tweedr/ui/middleware.py
# def add_duration_header(app):
#     def call(environ, start_response):
#         def wrapped_start_response(status, headers):
# 
# Path: tweedr/ui/crf.py
# GLOBALS = dict(tagger=CRF.default(crf_feature_functions))
# def root():
# def index():
# def tokenized_labels_sample():
# def tagger_tag():
# def tagger_retrain():
# def serve_static_file(filepath):
# def serve_templates_file(filepath):


from bottle import run
from tweedr.ui import middleware, crf


def main():
    '''This is called by the package's console_scripts entry point "tweedr-ui"

    The reloader is slow and only handles python module changes.
    I recommend using 3rd party restarter, say, node_restarter:
        node_restarter **/*.py **/*.css **/*.mako 'python tweedr/cli/ui.py'
    '''

# Path: tweedr/ui/middleware.py
# def add_duration_header(app):
#     def call(environ, start_response):
#         def wrapped_start_response(status, headers):
# 
# Path: tweedr/ui/crf.py
# GLOBALS = dict(tagger=CRF.default(crf_feature_functions))
# def root():
# def index():
# def tokenized_labels_sample():
# def tagger_tag():
# def tagger_retrain():
# def serve_static_file(filepath):
# def serve_templates_file(filepath):


# Path: tweedr/cli/ui.py
from bottle import run
from tweedr.ui import middleware, crf



def main():
    '''This is called by the package's console_scripts entry point "tweedr-ui"

    The reloader is slow and only handles python module changes.
    I recommend using 3rd party restarter, say, node_restarter:
        node_restarter **/*.py **/*.css **/*.mako 'python tweedr/cli/ui.py'
    '''

    app = middleware.add_duration_header(crf.app)