Update aitrain.py
This commit is contained in:
parent
37c0e32b7f
commit
e4ddb3b32c
1 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@ async def on_message(message):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
writing_function = functools.partial(add_to_train, message.clean_content)
|
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()
|
@commands.is_owner()
|
||||||
@client.command()
|
@client.command()
|
||||||
|
@ -45,9 +45,9 @@ async def train(ctx):
|
||||||
async def stopbot(ctx):
|
async def stopbot(ctx):
|
||||||
async with ctx.typing:
|
async with ctx.typing:
|
||||||
training_function = functools.partial(textgen.train_from_file, 'train.txt', num_epochs=11)
|
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 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')
|
client.run('BOTTOKEN')
|
||||||
|
|
Loading…
Reference in a new issue