File size: 2,039 Bytes
ca2c89c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Utils package for NLP Ultimate Tutorial Flask Application

from .helpers import (
    fig_to_html,
    df_to_html_table,
    text_statistics,
    create_text_length_chart,
    format_pos_token,
    create_entity_span,
    create_sentiment_color,
    format_sentiment_score,
    create_progress_bar,
    create_confidence_gauge
)

from .model_loader import (
    download_nltk_resources,
    load_spacy,
    load_sentiment_analyzer,
    load_emotion_classifier,
    load_summarizer,
    load_qa_pipeline,
    load_translator,
    load_text_generator,
    load_zero_shot,
    load_embedding_model,
    initialize_all_models,
    get_model_status,
    clear_models
)

from .visualization import (
    setup_mpl_style,
    create_bar_chart,
    create_horizontal_bar_chart,
    create_pie_chart,
    create_line_chart,
    create_scatter_plot,
    create_heatmap,
    create_word_cloud_placeholder,
    create_network_graph,
    create_gauge_chart,
    create_comparison_chart
)

__all__ = [
    # Helpers
    'fig_to_html',
    'df_to_html_table',
    'text_statistics',
    'create_text_length_chart',
    'format_pos_token',
    'create_entity_span',
    'create_sentiment_color',
    'format_sentiment_score',
    'create_progress_bar',
    'create_confidence_gauge',
    
    # Model Loader
    'download_nltk_resources',
    'load_spacy',
    'load_sentiment_analyzer',
    'load_emotion_classifier',
    'load_summarizer',
    'load_qa_pipeline',
    'load_translator',
    'load_text_generator',
    'load_zero_shot',
    'load_embedding_model',
    'initialize_all_models',
    'get_model_status',
    'clear_models',
    
    # Visualization
    'setup_mpl_style',
    'create_bar_chart',
    'create_horizontal_bar_chart',
    'create_pie_chart',
    'create_line_chart',
    'create_scatter_plot',
    'create_heatmap',
    'create_word_cloud_placeholder',
    'create_network_graph',
    'create_gauge_chart',
    'create_comparison_chart'
]