Araeynn commited on
Commit
4963097
·
verified ·
1 Parent(s): 3bd9595

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -178,7 +178,9 @@ async def on_message(message: discord.Message):
178
  ats = []
179
  if len(message.attachments) > 0:
180
  for i in message.attachments:
181
- Image.open(io.BytesIO(i.read())).save("image.png")
 
 
182
  ats.append(f"ImageInput:{caption('image.png')}")
183
  print(caption("image.png"))
184
  s = f"GPT4 Correct {message.author}: {message.content} Attachments: {' '.join(ats)}<|end_of_turn|>"
 
178
  ats = []
179
  if len(message.attachments) > 0:
180
  for i in message.attachments:
181
+ print(i)
182
+ print(await i.read())
183
+ Image.open(io.BytesIO(await i.read())).save("image.png")
184
  ats.append(f"ImageInput:{caption('image.png')}")
185
  print(caption("image.png"))
186
  s = f"GPT4 Correct {message.author}: {message.content} Attachments: {' '.join(ats)}<|end_of_turn|>"