mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-30 15:04:18 +00:00
fix bug and slip
This commit is contained in:
parent
2a0714b8b8
commit
caa2fff26c
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ class MarkovCommand(Command):
|
||||||
files: List[str] = tuple(os.walk(self.config["Markov"]["models_directory"]))[0][2]
|
files: List[str] = tuple(os.walk(self.config["Markov"]["models_directory"]))[0][2]
|
||||||
for file in files:
|
for file in files:
|
||||||
match = re.match("(\S+)\.json", file)
|
match = re.match("(\S+)\.json", file)
|
||||||
|
if match is None:
|
||||||
|
continue
|
||||||
model_name = match.group(1)
|
model_name = match.group(1)
|
||||||
with open(os.path.join(self.config["Markov"]["models_directory"], file)) as f:
|
with open(os.path.join(self.config["Markov"]["models_directory"], file)) as f:
|
||||||
self._texts[model_name] = markovify.NewlineText.from_json(f.read())
|
self._texts[model_name] = markovify.NewlineText.from_json(f.read())
|
||||||
|
|
Loading…
Reference in a new issue