lunarflu commited on
Commit ·
35b1d5c
1
Parent(s): 6ee42a9
Update app.py
Browse files60 unmodified lines6162636465666711 unmodified lines798081828384858687888960 unmodified lines"""Runs music_create_job in executor"""try:message = await ctx.send(f"**{prompt}** - {ctx.author.mention} Generating...")loop = asyncio.get_running_loop()client = await loop.run_in_executor(None, get_client, None)job = client.submit(prompt, seed, api_name="/predict")11 unmodified lineswith open(video, "rb") as file:discord_video_file = discord.File(file, filename=video_filename)await ctx.send(file=discord_video_file)with open(audio, "rb") as file:discord_audio_file = discord.File(file, filename=audio_filename)await ctx.send(file=discord_audio_file)except QueueError:await ctx.send("The gradio space powering this bot is really busy! Please try again later!")60 unmodified lines616263646566676811 unmodified lines80818283848586878889909160 unmodified lines"""Runs music_create_job in executor"""try:message = await ctx.send(f"**{prompt}** - {ctx.author.mention} Generating...")thread = await message.create_thread(name=prompt[:100])loop = asyncio.get_running_loop()client = await loop.run_in_executor(None, get_client, None)job = client.submit(prompt, seed, api_name="/predict")11 unmodified lineswith open(video, "rb") as file:discord_video_file = discord.File(file, filename=video_filename)await thread.send(file=discord_video_file)with open(audio, "rb") as file:discord_audio_file = discord.File(file, filename=audio_filename)await thread.send(file=discord_audio_file)#await message.delete()except QueueError:await ctx.send("The gradio space powering this bot is really busy! Please try again later!")
app.py+5-3