Paula Leonova commited on
Commit
79d9303
·
1 Parent(s): 66a86a3

Move model load calls

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,9 +9,6 @@ from models import create_nest_sentences, load_summary_model, summarizer_gen, lo
9
  from utils import plot_result, plot_dual_bar_chart, examples_load, example_long_text_load
10
  import json
11
 
12
-
13
- summarizer = load_summary_model()
14
- classifier = load_model()
15
  ex_text, ex_license, ex_labels = examples_load()
16
  ex_long_text = example_long_text_load()
17
 
@@ -34,6 +31,9 @@ with st.form(key='my_form'):
34
  labels = list(set([x.strip() for x in labels.strip().split(',') if len(x.strip()) > 0]))
35
  submit_button = st.form_submit_button(label='Submit')
36
 
 
 
 
37
  if submit_button:
38
  if len(labels) == 0:
39
  st.write('Enter some text and at least one possible topic to see predictions.')
 
9
  from utils import plot_result, plot_dual_bar_chart, examples_load, example_long_text_load
10
  import json
11
 
 
 
 
12
  ex_text, ex_license, ex_labels = examples_load()
13
  ex_long_text = example_long_text_load()
14
 
 
31
  labels = list(set([x.strip() for x in labels.strip().split(',') if len(x.strip()) > 0]))
32
  submit_button = st.form_submit_button(label='Submit')
33
 
34
+ summarizer = load_summary_model()
35
+ classifier = load_model()
36
+
37
  if submit_button:
38
  if len(labels) == 0:
39
  st.write('Enter some text and at least one possible topic to see predictions.')