Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,7 @@ import time
|
|
16 |
import os
|
17 |
from gradio_client import Client
|
18 |
|
19 |
-
async def C(x):
|
20 |
-
c = Client(src="ybelkada/llava-1-5-dlai")
|
21 |
print(c.view_api(return_format="dict"))
|
22 |
result = c.predict(
|
23 |
"Make a detailed description of the image. This would be sufficient for an LLM to answer questions about it with just your answer.",
|
@@ -403,7 +402,7 @@ async def on_message(message):
|
|
403 |
if imgp != "":
|
404 |
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"""
|
405 |
st = time.time()
|
406 |
-
image = await
|
407 |
image.save("image.png")
|
408 |
embed.set_footer(
|
409 |
text=
|
@@ -412,7 +411,7 @@ async def on_message(message):
|
|
412 |
file = discord.File("image.png", filename="image.png", description=imgp)
|
413 |
embed.set_image(url="attachment://image.png")
|
414 |
await e.edit(embed=embed, attachments=[file])
|
415 |
-
image = await RF.image_to_image("image.png"
|
416 |
et = time.time()
|
417 |
embed.set_footer(
|
418 |
text=
|
|
|
16 |
import os
|
17 |
from gradio_client import Client
|
18 |
|
19 |
+
async def C(x): c = Client(src="ybelkada/llava-1-5-dlai")
|
|
|
20 |
print(c.view_api(return_format="dict"))
|
21 |
result = c.predict(
|
22 |
"Make a detailed description of the image. This would be sufficient for an LLM to answer questions about it with just your answer.",
|
|
|
402 |
if imgp != "":
|
403 |
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"""
|
404 |
st = time.time()
|
405 |
+
image = await SD.text_to_image(imgp, negative_prompt=np)
|
406 |
image.save("image.png")
|
407 |
embed.set_footer(
|
408 |
text=
|
|
|
411 |
file = discord.File("image.png", filename="image.png", description=imgp)
|
412 |
embed.set_image(url="attachment://image.png")
|
413 |
await e.edit(embed=embed, attachments=[file])
|
414 |
+
image = await RF.image_to_image("image.png")
|
415 |
et = time.time()
|
416 |
embed.set_footer(
|
417 |
text=
|