Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -82,6 +82,11 @@ client = discord.Client(intents=intents)
|
|
82 |
|
83 |
launch_time = datetime.datetime.utcnow()
|
84 |
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
@client.event
|
87 |
async def on_ready():
|
@@ -151,7 +156,7 @@ async def on_message(message):
|
|
151 |
If the user asks you to generate an image, use the start tag <|image|> and the end tag <|image|> around the prompt to generate it. Put this at the end of your response. Do not use a link for the image.
|
152 |
For example, if the user asks you to generate an image of a cat, you would say <|image|>A cute cat with long fur that is looking out a window with curious eyes.<|image|>
|
153 |
Always include a title.
|
154 |
-
Do not generate images unless the user speciifes that they want an image."""
|
155 |
try:
|
156 |
os.mkdir("data/" + guild_name)
|
157 |
except:
|
@@ -207,7 +212,7 @@ async def on_message(message):
|
|
207 |
e = await message.reply(embed=embed)
|
208 |
print(imgp)
|
209 |
if imgp != "":
|
210 |
-
image = await
|
211 |
image.save("image.png")
|
212 |
embed.set_footer(
|
213 |
text=
|
@@ -216,7 +221,7 @@ async def on_message(message):
|
|
216 |
file = discord.File("image.png", filename="image.png")
|
217 |
embed.set_image(url="attachment://image.png")
|
218 |
await e.edit(embed=embed, attachments=[file])
|
219 |
-
image = await
|
220 |
embed.set_footer(
|
221 |
text=
|
222 |
"""Information or code generated by Lyre may not always be correct. Lyre was made by Araeyn."""
|
|
|
82 |
|
83 |
launch_time = datetime.datetime.utcnow()
|
84 |
|
85 |
+
async def tti(p):
|
86 |
+
SD.text_to_image(p)
|
87 |
+
|
88 |
+
async def iti(p):
|
89 |
+
RF.image_to_image(p)
|
90 |
|
91 |
@client.event
|
92 |
async def on_ready():
|
|
|
156 |
If the user asks you to generate an image, use the start tag <|image|> and the end tag <|image|> around the prompt to generate it. Put this at the end of your response. Do not use a link for the image.
|
157 |
For example, if the user asks you to generate an image of a cat, you would say <|image|>A cute cat with long fur that is looking out a window with curious eyes.<|image|>
|
158 |
Always include a title.
|
159 |
+
Do not generate images unless the user speciifes that they want an image."""
|
160 |
try:
|
161 |
os.mkdir("data/" + guild_name)
|
162 |
except:
|
|
|
212 |
e = await message.reply(embed=embed)
|
213 |
print(imgp)
|
214 |
if imgp != "":
|
215 |
+
image = await tti(imgp)
|
216 |
image.save("image.png")
|
217 |
embed.set_footer(
|
218 |
text=
|
|
|
221 |
file = discord.File("image.png", filename="image.png")
|
222 |
embed.set_image(url="attachment://image.png")
|
223 |
await e.edit(embed=embed, attachments=[file])
|
224 |
+
image = await iti("image.png")
|
225 |
embed.set_footer(
|
226 |
text=
|
227 |
"""Information or code generated by Lyre may not always be correct. Lyre was made by Araeyn."""
|