ierhon commited on
Commit
0f63582
1 Parent(s): 8e0e6a5

Add length constants

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,10 +4,12 @@ from keras.models import load_model
4
  from keras_self_attention import SeqSelfAttention
5
  import numpy as np
6
 
7
- model = load_model("model.keras", custom_objects={"SeqSelfAttention":SeqSelfAttention})
8
  with open("tokenizer.pckl", "rb") as file:
9
  tokenizer = pickle.load(file)
10
 
 
 
11
  def classify(text: str, response: str):
12
  question = list(tokenizer.texts_to_sequences([text.lower(),])[0])
13
  answer = list(tokenizer.texts_to_sequences([response.lower(),])[0])
 
4
  from keras_self_attention import SeqSelfAttention
5
  import numpy as np
6
 
7
+ model = load_model("model.keras", custom_objects={"SeqSelfAttention": SeqSelfAttention})
8
  with open("tokenizer.pckl", "rb") as file:
9
  tokenizer = pickle.load(file)
10
 
11
+ l1, l2 = 10, 10
12
+
13
  def classify(text: str, response: str):
14
  question = list(tokenizer.texts_to_sequences([text.lower(),])[0])
15
  answer = list(tokenizer.texts_to_sequences([response.lower(),])[0])