Update aitrain.py

This commit is contained in:
insert username here 2021-05-21 20:21:56 -04:00 committed by GitHub
parent 37c0e32b7f
commit e4ddb3b32c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ async def on_message(message):
pass
else:
writing_function = functools.partial(add_to_train, message.clean_content)
await bot.loop.run_in_executor(None, writing_function)
await client.loop.run_in_executor(None, writing_function)
@commands.is_owner()
@client.command()
@ -45,9 +45,9 @@ async def train(ctx):
async def stopbot(ctx):
async with ctx.typing:
training_function = functools.partial(textgen.train_from_file, 'train.txt', num_epochs=11)
await bot.loop.run_in_executor(None, training_function)
await client.loop.run_in_executor(None, training_function)
await ctx.send("data collection done, I will now log of discord and build an a.i")
await bot.logout()
await client.logout()
client.run('BOTTOKEN')