Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -174,14 +174,7 @@ async def on_message(message: discord.Message):
|
|
| 174 |
if message.author == client.user:
|
| 175 |
return
|
| 176 |
ats = []
|
| 177 |
-
|
| 178 |
-
for i in message.attachments:
|
| 179 |
-
print(i)
|
| 180 |
-
print(await i.read())
|
| 181 |
-
Image.open(io.BytesIO(await 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|>"
|
| 185 |
try:
|
| 186 |
with open(os.path.join(guild_name, f"{msgchannel_name}.txt"), "a") as f:
|
| 187 |
f.write(s)
|
|
|
|
| 174 |
if message.author == client.user:
|
| 175 |
return
|
| 176 |
ats = []
|
| 177 |
+
s = f"GPT4 Correct {message.author}: {message.content}<|end_of_turn|>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
try:
|
| 179 |
with open(os.path.join(guild_name, f"{msgchannel_name}.txt"), "a") as f:
|
| 180 |
f.write(s)
|