Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -73,6 +73,8 @@ proteus = "dataautogpt3/ProteusV0.2"
|
|
73 |
sd_2_1 = "stabilityai/stable-diffusion-2-1"
|
74 |
open_journey = "prompthero/openjourney-v4"
|
75 |
SD = AsyncInferenceClient(model=sd_2_1)
|
|
|
|
|
76 |
LLM = AsyncInferenceClient(model="openchat/openchat-3.5-0106")
|
77 |
RF = AsyncInferenceClient(model="stabilityai/stable-diffusion-xl-refiner-1.0")
|
78 |
|
@@ -147,7 +149,7 @@ async def on_message(message):
|
|
147 |
Use <|title|> at the start of your title for the response and <|title|> at the end of the title.
|
148 |
Your title is a conversation name that ChatGPT would make for the response and question.
|
149 |
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.
|
150 |
-
For example, if the user asks you to generate an image of a cat, you could say
|
151 |
Always include a title.
|
152 |
Do not generate images unless the user speciifes that they want an image."""
|
153 |
try:
|
@@ -204,7 +206,8 @@ async def on_message(message):
|
|
204 |
e = await message.reply(embed=embed)
|
205 |
if imgp != "":
|
206 |
try:
|
207 |
-
|
|
|
208 |
image.save("image.png")
|
209 |
embed.set_footer(
|
210 |
text=
|
|
|
73 |
sd_2_1 = "stabilityai/stable-diffusion-2-1"
|
74 |
open_journey = "prompthero/openjourney-v4"
|
75 |
SD = AsyncInferenceClient(model=sd_2_1)
|
76 |
+
SDT = AsyncInferenceClient(model=sdxl_turbo)
|
77 |
+
PT = AsyncInferenceClient(model=proteus)
|
78 |
LLM = AsyncInferenceClient(model="openchat/openchat-3.5-0106")
|
79 |
RF = AsyncInferenceClient(model="stabilityai/stable-diffusion-xl-refiner-1.0")
|
80 |
|
|
|
149 |
Use <|title|> at the start of your title for the response and <|title|> at the end of the title.
|
150 |
Your title is a conversation name that ChatGPT would make for the response and question.
|
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 could say <|image|>A cute cat with long fur that is looking out a window with curious eyes, hd, realistic<|image|>
|
153 |
Always include a title.
|
154 |
Do not generate images unless the user speciifes that they want an image."""
|
155 |
try:
|
|
|
206 |
e = await message.reply(embed=embed)
|
207 |
if imgp != "":
|
208 |
try:
|
209 |
+
np = """lowres, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature"""
|
210 |
+
image = await PT.text_to_image(imgp, negative_prompt=np)
|
211 |
image.save("image.png")
|
212 |
embed.set_footer(
|
213 |
text=
|