lunarflu HF Staff commited on
Commit
d78932e
·
1 Parent(s): 229d195

await asyncio.get_running_loop().run_in_executor(None, jojogan.predict, attachment.url, style)

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -56,7 +56,8 @@ async def discord_before(ctx):
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'),
 
56
  async def generation(ctx, attachment):
57
  if attachment:
58
  style = 'JoJo'
59
+ await asyncio.get_running_loop().run_in_executor(None, jojogan.predict, attachment.url, style)
60
+ #im = await asyncio.to_thread(jojogan.predict, attachment.url, style)
61
  #im = jojogan.predict(attachment.url, style)
62
  await asyncio.gather(
63
  ctx.send(f'{ctx.author.mention} Here is the jojo version of it'),