Spaces:
Sleeping
Sleeping
Fix cannot concatenate NoneType
Browse files- chatbot_constructor.py +5 -1
chatbot_constructor.py
CHANGED
@@ -47,7 +47,11 @@ def train(message: str = "", regularization: float = 0.0001, dropout: float = 0.
|
|
47 |
vocab_size = len(tokenizer.word_index) + 1
|
48 |
inp_len = input_len
|
49 |
if data_hash is None:
|
50 |
-
|
|
|
|
|
|
|
|
|
51 |
elif message == "!getmodelhash":
|
52 |
return data_hash
|
53 |
else:
|
|
|
47 |
vocab_size = len(tokenizer.word_index) + 1
|
48 |
inp_len = input_len
|
49 |
if data_hash is None:
|
50 |
+
if end_activation is not None:
|
51 |
+
data_hash = hash_str(data)+"_"+str(regularization)+"_"+str(dropout)+"_"+str(learning_rate)+"_"+str(epochs)+"_"+str(emb_size)+"_"+str(inp_len)+"_"+str(kernels_count)+"_"+str(kernel_size)+"_"+str(left_padding)+"_"+end_activation+".keras"
|
52 |
+
else:
|
53 |
+
|
54 |
+
data_hash = hash_str(data)+"_"+str(regularization)+"_"+str(dropout)+"_"+str(learning_rate)+"_"+str(epochs)+"_"+str(emb_size)+"_"+str(inp_len)+"_"+str(kernels_count)+"_"+str(kernel_size)+"_"+str(left_padding)+".keras"
|
55 |
elif message == "!getmodelhash":
|
56 |
return data_hash
|
57 |
else:
|