imamnurby commited on
Commit
ac70186
1 Parent(s): 15a540f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -12,12 +12,13 @@ app = Flask(__name__)
12
  components = initialize_all_components(config)
13
  db_metadata = components[0]
14
  db_constructor = components[1]
15
- model_retrieval = components[2]
16
- model_generative = components[3]
17
- tokenizer_generative = components[4]
18
- model_classifier = components[5]
19
- classifier_head = components[6]
20
- tokenizer_classifier = components[7]
 
21
 
22
  def call_predict_api(
23
  input_query,
@@ -25,7 +26,7 @@ def call_predict_api(
25
  model_generative,
26
  model_classifier, classifier_head,
27
  tokenizer_generative, tokenizer_classifier,
28
- db_metadata, db_constructor,
29
  config
30
  ):
31
  '''
@@ -37,7 +38,7 @@ def call_predict_api(
37
  model_generative,
38
  model_classifier, classifier_head,
39
  tokenizer_generative, tokenizer_classifier,
40
- db_metadata, db_constructor,
41
  config
42
  )
43
  return predictions
@@ -61,7 +62,7 @@ def predict():
61
  model_generative,
62
  model_classifier, classifier_head,
63
  tokenizer_generative, tokenizer_classifier,
64
- db_metadata, db_constructor,
65
  config
66
  )
67
  print("success prediction!")
 
12
  components = initialize_all_components(config)
13
  db_metadata = components[0]
14
  db_constructor = components[1]
15
+ db_params = components[2]
16
+ model_retrieval = components[3]
17
+ model_generative = components[4]
18
+ tokenizer_generative = components[5]
19
+ model_classifier = components[6]
20
+ classifier_head = components[7]
21
+ tokenizer_classifier = components[8]
22
 
23
  def call_predict_api(
24
  input_query,
 
26
  model_generative,
27
  model_classifier, classifier_head,
28
  tokenizer_generative, tokenizer_classifier,
29
+ db_metadata, db_constructor, db_params,
30
  config
31
  ):
32
  '''
 
38
  model_generative,
39
  model_classifier, classifier_head,
40
  tokenizer_generative, tokenizer_classifier,
41
+ db_metadata, db_constructor, db_params,
42
  config
43
  )
44
  return predictions
 
62
  model_generative,
63
  model_classifier, classifier_head,
64
  tokenizer_generative, tokenizer_classifier,
65
+ db_metadata, db_constructor, db_params,
66
  config
67
  )
68
  print("success prediction!")