lunarflu HF Staff commited on
Commit
0fd21c2
Β·
1 Parent(s): 8d38d87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -17
app.py CHANGED
@@ -32,14 +32,8 @@ bot = commands.Bot(command_prefix='!', intents=intents)
32
  async def jojo(ctx):
33
  attachment = await discord_before(ctx)
34
  if attachment:
35
- blocking_coro = asyncio.to_thread(generation, ctx, attachment)
36
- #result = await blocking_coro
37
- task = asyncio.create_task(blocking_coro)
38
- #await discord_after()
39
-
40
-
41
-
42
-
43
  async def discord_before(ctx):
44
  if ctx.message.attachments:
45
  await asyncio.gather(
@@ -67,16 +61,7 @@ async def generation(ctx, attachment):
67
  )
68
 
69
 
70
- '''
71
- async def discord_after(ctx, im):
72
- await asyncio.gather(
73
- ctx.send(f'{ctx.author.mention} Here is the jojo version of it'),
74
- ctx.send(file=discord.File(im)),
75
- ctx.message.remove_reaction('βŒ›', bot.user),
76
- ctx.message.add_reaction('βœ…')
77
- )
78
 
79
- '''
80
 
81
 
82
 
@@ -95,7 +80,16 @@ demo.launch()
95
 
96
 
97
 
 
 
 
 
 
 
 
 
98
 
 
99
 
100
 
101
  '''
 
32
  async def jojo(ctx):
33
  attachment = await discord_before(ctx)
34
  if attachment:
35
+ await generation(ctx, attachment)
36
+
 
 
 
 
 
 
37
  async def discord_before(ctx):
38
  if ctx.message.attachments:
39
  await asyncio.gather(
 
61
  )
62
 
63
 
 
 
 
 
 
 
 
 
64
 
 
65
 
66
 
67
 
 
80
 
81
 
82
 
83
+ '''
84
+ async def discord_after(ctx, im):
85
+ await asyncio.gather(
86
+ ctx.send(f'{ctx.author.mention} Here is the jojo version of it'),
87
+ ctx.send(file=discord.File(im)),
88
+ ctx.message.remove_reaction('βŒ›', bot.user),
89
+ ctx.message.add_reaction('βœ…')
90
+ )
91
 
92
+ '''
93
 
94
 
95
  '''