Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -196,19 +196,21 @@ async def on_message(message):
|
|
196 |
text=
|
197 |
"""Information or code generated by Lyre may not always be correct. Lyre was made by Araeyn."""
|
198 |
)
|
|
|
|
|
199 |
e = await message.reply(embed=embed)
|
200 |
print(imgp)
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
|
213 |
|
214 |
except Exception as e:
|
|
|
196 |
text=
|
197 |
"""Information or code generated by Lyre may not always be correct. Lyre was made by Araeyn."""
|
198 |
)
|
199 |
+
if imgp != "":
|
200 |
+
embed.set_image(url=load)
|
201 |
e = await message.reply(embed=embed)
|
202 |
print(imgp)
|
203 |
+
if imgp != "":
|
204 |
+
image = SD.text_to_image(imgp)
|
205 |
+
image.save("image.png")
|
206 |
+
image = RF.image_to_image("image.png")
|
207 |
+
if image["warnings"]:
|
208 |
+
print(image)
|
209 |
+
return 0
|
210 |
+
image.save("image.png")
|
211 |
+
file = discord.File("image.png", filename="image.png")
|
212 |
+
embed.set_image(url="attachment://image.png")
|
213 |
+
await e.edit(embed=embed, attachments=[file])
|
214 |
|
215 |
|
216 |
except Exception as e:
|