ierhon commited on
Commit
87d2f85
1 Parent(s): c0764f1

Update default settings

Browse files
Files changed (1) hide show
  1. chatbot_constructor.py +3 -3
chatbot_constructor.py CHANGED
@@ -32,7 +32,7 @@ def todset(text: str):
32
  def hash_str(data: str):
33
  return hashlib.md5(data.encode('utf-8')).hexdigest()
34
 
35
- def train(message: str = "", regularization: float = 0.0001, dropout: float = 0.1, learning_rate: float = 0.001, epochs: int = 16, emb_size: int = 128, input_len: int = 16, kernels_count: int = 8, kernel_size: int = 8, left_padding: bool = True, end_activation: str = "softmax", data: str = ""):
36
  data_hash = None
37
  if "→" not in data or "\n" not in data:
38
  if data in os.listdir("cache"): # data = filename
@@ -121,10 +121,10 @@ if __name__ == "__main__":
121
  gr.inputs.Slider(0, 0.5, default=0.1, step=1e-8, label="Dropout"),
122
  gr.inputs.Slider(1e-8, 0.01, default=0.001, step=1e-8, label="Learning rate"),
123
  gr.inputs.Slider(1, 64, default=32, step=1, label="Epochs"),
124
- gr.inputs.Slider(1, 256, default=100, step=1, label="Embedding size"),
125
  gr.inputs.Slider(1, 128, default=16, step=1, label="Input Length"),
126
  gr.inputs.Slider(1, 128, default=64, step=1, label="Convolution kernel count"),
127
- gr.inputs.Slider(1, 16, default=8, step=1, label="Convolution kernel size"),
128
  gr.inputs.Checkbox(False, label="Use left padding"),
129
  gr.inputs.Radio(['softmax', 'sigmoid', 'linear', 'softplus', 'exponential', 'log_softmax'], label="Output activation function"),
130
  "text"],
 
32
  def hash_str(data: str):
33
  return hashlib.md5(data.encode('utf-8')).hexdigest()
34
 
35
+ def train(message: str = "", regularization: float = 0.0001, dropout: float = 0.1, learning_rate: float = 0.001, epochs: int = 16, emb_size: int = 100, input_len: int = 16, kernels_count: int = 64, kernel_size: int = 4, left_padding: bool = False, end_activation: str = "softmax", data: str = ""):
36
  data_hash = None
37
  if "→" not in data or "\n" not in data:
38
  if data in os.listdir("cache"): # data = filename
 
121
  gr.inputs.Slider(0, 0.5, default=0.1, step=1e-8, label="Dropout"),
122
  gr.inputs.Slider(1e-8, 0.01, default=0.001, step=1e-8, label="Learning rate"),
123
  gr.inputs.Slider(1, 64, default=32, step=1, label="Epochs"),
124
+ gr.inputs.Slider(1, 256, default=88, step=1, label="Embedding size"),
125
  gr.inputs.Slider(1, 128, default=16, step=1, label="Input Length"),
126
  gr.inputs.Slider(1, 128, default=64, step=1, label="Convolution kernel count"),
127
+ gr.inputs.Slider(1, 16, default=2, step=1, label="Convolution kernel size"),
128
  gr.inputs.Checkbox(False, label="Use left padding"),
129
  gr.inputs.Radio(['softmax', 'sigmoid', 'linear', 'softplus', 'exponential', 'log_softmax'], label="Output activation function"),
130
  "text"],