lunarflu HF Staff commited on
Commit
b56f69c
Β·
1 Parent(s): f85a8ab

[decorators] re-adding The Painter

Browse files
Files changed (1) hide show
  1. app.py +23 -1
app.py CHANGED
@@ -24,10 +24,12 @@ import shutil # for doing image movement magic
24
 
25
 
26
  DFIF_TOKEN = os.getenv('HF_TOKEN')
 
 
27
  df = Client("huggingface-projects/IF", DFIF_TOKEN)
 
28
 
29
 
30
- DISCORD_TOKEN = os.environ.get("GRADIOTEST_TOKEN", None)
31
  intents = discord.Intents.default()
32
  intents.message_content = True
33
 
@@ -42,6 +44,26 @@ async def on_ready():
42
  bot.log_channel = bot.get_channel(1100458786826747945) # 1100458786826747945 = bot-test, 1107006391547342910 = lunarbot server
43
 
44
  #----------------------------------------------------------------------------------------------------------------------------------------------
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  # Stage 1
46
  @bot.command()
47
  async def deepfloydif(ctx, *, prompt: str):
 
24
 
25
 
26
  DFIF_TOKEN = os.getenv('HF_TOKEN')
27
+ DISCORD_TOKEN = os.environ.get("GRADIOTEST_TOKEN", None)
28
+
29
  df = Client("huggingface-projects/IF", DFIF_TOKEN)
30
+ jojogan = gradio_client.Client("akhaliq/JoJoGAN")
31
 
32
 
 
33
  intents = discord.Intents.default()
34
  intents.message_content = True
35
 
 
44
  bot.log_channel = bot.get_channel(1100458786826747945) # 1100458786826747945 = bot-test, 1107006391547342910 = lunarbot server
45
 
46
  #----------------------------------------------------------------------------------------------------------------------------------------------
47
+ # jojo
48
+ @bot.command
49
+ async def jojo(ctx): # needs safety, easier to do safety function since they'll all have similar constraints
50
+
51
+ await ctx.message.add_reaction('πŸ‘')
52
+ thread = await ctx.message.create_thread(name=f'{ctx.author} Jojo Thread ')
53
+
54
+ style = None
55
+ style = 'JoJo'
56
+
57
+ await thread.send(f'{ctx.author.mention}Generating JoJo image in thread, yare yare daze...')
58
+
59
+ if style:
60
+ if ctx.message.attachments:
61
+ attachment = ctx.message.attachments[0]
62
+ im = jojogan.predict(attachment.url, style)
63
+ await ctx.message.reply(f'Here is the {style} version of it', file=discord.File(im))
64
+ else:
65
+ await ctx.message.channel.send("No attachments to be found...Can't animify dat! Try sending me an image πŸ˜‰")
66
+ #----------------------------------------------------------------------------------------------------------------------------------------------
67
  # Stage 1
68
  @bot.command()
69
  async def deepfloydif(ctx, *, prompt: str):