await asyncio.get_running_loop().run_in_executor(None, jojogan.predict, attachment.url, style)
Browse files
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 |
-
|
|
|
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'),
|