edia_datos_es / app.py
nanom's picture
Added type hinting and config file
2225e5e
raw
history blame contribute delete
938 Bytes
# --- Imports libs ---
import configparser
# --- Imports modules ---
from modules.module_vocabulary import Vocabulary
# --- Imports interfaces ---
from interfaces.interface_datos import interface as interface_datos
# --- Tool config ---
cfg = configparser.ConfigParser()
cfg.read('tool.cfg')
LANGUAGE = cfg['INTERFACE']['language']
CONTEXTS_DATASET = cfg['DATA']['contexts_dataset']
VOCABULARY_SUBSET = cfg['DATA']['vocabulary_subset']
AVAILABLE_WORDCLOUD = cfg['DATA'].getboolean('available_wordcloud')
AVAILABLE_LOGS = cfg['LOGS'].getboolean('available_logs')
# --- Init classes ---
vocabulary = Vocabulary(
subset_name=VOCABULARY_SUBSET
)
# --- Main App ---
iface = interface_datos(
vocabulary=vocabulary,
contexts=CONTEXTS_DATASET,
available_logs=AVAILABLE_LOGS,
available_wordcloud=AVAILABLE_WORDCLOUD,
lang=LANGUAGE
)
iface.queue(concurrency_count=8)
iface.launch(debug=False)