Spaces:
Paused
Paused
Update app.py
Browse files
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 |
-
|
|
|
|
|
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|>"
|