Move "message" above "data"
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ maxshift = 4
|
|
18 |
def hash_str(data: str):
|
19 |
return hashlib.md5(data.encode('utf-8')).hexdigest()
|
20 |
|
21 |
-
def train(
|
22 |
if "→" not in data or "\n" not in data:
|
23 |
return "Dataset example:\nquestion→answer\nquestion→answer\netc."
|
24 |
dset, responses = todset(data)
|
|
|
18 |
def hash_str(data: str):
|
19 |
return hashlib.md5(data.encode('utf-8')).hexdigest()
|
20 |
|
21 |
+
def train(message: str, data: str):
|
22 |
if "→" not in data or "\n" not in data:
|
23 |
return "Dataset example:\nquestion→answer\nquestion→answer\netc."
|
24 |
dset, responses = todset(data)
|