Araeynn commited on
Commit
ab0b90d
1 Parent(s): f8ae7f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -74,6 +74,8 @@ HF_TOKEN = os.environ["HF_TOKEN"]
74
  login(HF_TOKEN)
75
  sd_turbo = "stabilityai/sd-turbo"
76
  proteus = "dataautogpt3/ProteusV0.2"
 
 
77
  SD = AsyncInferenceClient(model=sd_turbo)
78
  LLM = AsyncInferenceClient(model="openchat/openchat-3.5-0106")
79
  RF = AsyncInferenceClient(model="stabilityai/stable-diffusion-xl-refiner-1.0")
@@ -142,18 +144,17 @@ async def on_message(message):
142
  s = f":green[{message.author}]: :violet[{message.content}] :blue[{msgchannel_name}] :orange[{guild_name}]"
143
  if message.author == client.user:
144
  return
145
- sysp = """GPT4 Correct System: You are lr, a discord bot. You were made by Araeyn.
146
  You must use the markdown format for your responses.
147
  Do not excessively use bullet points.
148
  Use emojis at the start of your responses.
149
  Use <|title|> at the start of your title for the response and <|title|> at the end of the title.
150
- Your title must summarize the user's 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
  Use the keywords 'best quality, HD, ~*~aesthetic~*~' in your prompt to improve it.
154
  Always include a title.
155
- Do not generate images unless the user speciifes that they want an image.
156
- Talk like the user does."""
157
  try:
158
  os.mkdir("data/" + guild_name)
159
  except:
@@ -208,7 +209,7 @@ async def on_message(message):
208
  e = await message.reply(embed=embed)
209
  if imgp != "":
210
  try:
211
- image = await SD.text_to_image(imgp)
212
  image.save("image.png")
213
  embed.set_footer(
214
  text=
 
74
  login(HF_TOKEN)
75
  sd_turbo = "stabilityai/sd-turbo"
76
  proteus = "dataautogpt3/ProteusV0.2"
77
+ sd_2_1 = "stabilityai/stable-diffusion-2-1"
78
+ open_journey = "prompthero/openjourney-v4"
79
  SD = AsyncInferenceClient(model=sd_turbo)
80
  LLM = AsyncInferenceClient(model="openchat/openchat-3.5-0106")
81
  RF = AsyncInferenceClient(model="stabilityai/stable-diffusion-xl-refiner-1.0")
 
144
  s = f":green[{message.author}]: :violet[{message.content}] :blue[{msgchannel_name}] :orange[{guild_name}]"
145
  if message.author == client.user:
146
  return
147
+ sysp = f"""GPT4 Correct System: You are lr, a discord bot. You were made by Araeyn.
148
  You must use the markdown format for your responses.
149
  Do not excessively use bullet points.
150
  Use emojis at the start of your responses.
151
  Use <|title|> at the start of your title for the response and <|title|> at the end of the title.
152
+ Your title is a conversation name that ChatGPT would make for the response and question.
153
  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.
154
  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|>
155
  Use the keywords 'best quality, HD, ~*~aesthetic~*~' in your prompt to improve it.
156
  Always include a title.
157
+ Do not generate images unless the user speciifes that they want an image."""
 
158
  try:
159
  os.mkdir("data/" + guild_name)
160
  except:
 
209
  e = await message.reply(embed=embed)
210
  if imgp != "":
211
  try:
212
+ image = await SD.text_to_image(imgp, negative_prompt="low quality, blurred")
213
  image.save("image.png")
214
  embed.set_footer(
215
  text=