Spaces:
Sleeping
Sleeping
Fix bug in error output
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ emb_size = 128
|
|
| 10 |
inp_len = 16
|
| 11 |
|
| 12 |
def train(data: str, message: str):
|
| 13 |
-
if "→" not in data
|
| 14 |
return "Dataset should be like:\nquestion→answer\nquestion→answer\netc."
|
| 15 |
dset, responses = todset(data)
|
| 16 |
resps_len = len(responses)
|
|
|
|
| 10 |
inp_len = 16
|
| 11 |
|
| 12 |
def train(data: str, message: str):
|
| 13 |
+
if "→" not in data or "\n" not in data:
|
| 14 |
return "Dataset should be like:\nquestion→answer\nquestion→answer\netc."
|
| 15 |
dset, responses = todset(data)
|
| 16 |
resps_len = len(responses)
|