lunarflu HF Staff commited on
Commit
75abc54
·
1 Parent(s): 956c50d

await asyncio.to_thread(jojogan.predict

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -33,7 +33,6 @@ async def lunar(ctx):
33
 
34
  @bot.command()
35
  async def jojo(ctx):
36
-
37
  attachment = await discord_before(ctx)
38
  if attachment:
39
  asyncio.create_task(generation(ctx, attachment))
@@ -57,7 +56,8 @@ async def discord_before(ctx):
57
  async def generation(ctx, attachment):
58
  if attachment:
59
  style = 'JoJo'
60
- im = jojogan.predict(attachment.url, style)
 
61
  await asyncio.gather(
62
  ctx.send(f'{ctx.author.mention} Here is the jojo version of it'),
63
  ctx.send(file=discord.File(im)),
 
33
 
34
  @bot.command()
35
  async def jojo(ctx):
 
36
  attachment = await discord_before(ctx)
37
  if attachment:
38
  asyncio.create_task(generation(ctx, attachment))
 
56
  async def generation(ctx, attachment):
57
  if attachment:
58
  style = 'JoJo'
59
+ im = await asyncio.to_thread(jojogan.predict, attachment.url, style)
60
+ #im = jojogan.predict(attachment.url, style)
61
  await asyncio.gather(
62
  ctx.send(f'{ctx.author.mention} Here is the jojo version of it'),
63
  ctx.send(file=discord.File(im)),