|
"""Application entry point, global configuration, application structure""" |
|
|
|
from config import app_config |
|
import data |
|
import utils |
|
import tab_about |
|
import tab_ner |
|
import tab_emotions as tab_emotions |
|
import tab_summarization |
|
import streamlit as st |
|
|
|
|
|
def init(): |
|
|
|
utils.setup_app(app_config) |
|
|
|
|
|
nlp = data.load_lang_model(app_config.spacy_lang_model) |
|
data.load_nltk_punkt() |
|
df = data.load_emotions_data(app_config.emotions_data_file) |
|
|
|
|
|
|
|
|
|
about, ner, summarization, sentiment = utils.create_tabs( |
|
["ABOUT π", "NER & POS π", "TEXT SUMMARIZATION π", "TEXT CLASSIFICATION π"] |
|
) |
|
with about: |
|
tab_about.render() |
|
with ner: |
|
tab_ner.render(nlp) |
|
with summarization: |
|
tab_summarization.render() |
|
with sentiment: |
|
tab_emotions.render(df) |
|
|
|
|
|
if __name__ == "__main__": |
|
init() |
|
|