Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -86,6 +86,7 @@ RF = AsyncInferenceClient(model="stabilityai/stable-diffusion-xl-refiner-1.0")
|
|
86 |
UP = AsyncInferenceClient(model="radames/stable-diffusion-x4-upscaler-img2img")
|
87 |
IC = AsyncInferenceClient(model="Salesforce/blip-image-captioning-large")
|
88 |
PRK = AsyncInferenceClient(model="nvidia/parakeet-tdt-1.1b")
|
|
|
89 |
|
90 |
|
91 |
def ec(x, fd="<|image|>", sd="<|image|>"):
|
@@ -449,7 +450,7 @@ async def on_message(message):
|
|
449 |
context += f"GPT4 Correct Assistant:"
|
450 |
load = random.choice(
|
451 |
[
|
452 |
-
"https://
|
453 |
]
|
454 |
)
|
455 |
output = await LLM.text_generation(context,
|
@@ -457,6 +458,7 @@ async def on_message(message):
|
|
457 |
max_new_tokens=2048)
|
458 |
title = ec(output, "<|title|>", "<|title|>")[0]
|
459 |
imgp = ec(output)[0]
|
|
|
460 |
with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
|
461 |
f.write(f"GPT4 Correct Assistant: {output}<|end_of_turn|>")
|
462 |
embed = discord.Embed(title=title,
|
@@ -510,7 +512,6 @@ async def on_message(message):
|
|
510 |
file = discord.File("image.png", filename="image.png")
|
511 |
embed.set_image(url="attachment://image.png")
|
512 |
await e.edit(embed=embed, attachments=[file])
|
513 |
-
|
514 |
except Exception as exc:
|
515 |
print(exc)
|
516 |
c = client.get_channel(1202160048126840882)
|
|
|
86 |
UP = AsyncInferenceClient(model="radames/stable-diffusion-x4-upscaler-img2img")
|
87 |
IC = AsyncInferenceClient(model="Salesforce/blip-image-captioning-large")
|
88 |
PRK = AsyncInferenceClient(model="nvidia/parakeet-tdt-1.1b")
|
89 |
+
MG = AsyncInferenceClient(model="facebook/musicgen-stereo-small")
|
90 |
|
91 |
|
92 |
def ec(x, fd="<|image|>", sd="<|image|>"):
|
|
|
450 |
context += f"GPT4 Correct Assistant:"
|
451 |
load = random.choice(
|
452 |
[
|
453 |
+
"https://mir-s3-cdn-cf.behance.net/project_modules/max_632/04de2e31234507.564a1d23645bf.gif"
|
454 |
]
|
455 |
)
|
456 |
output = await LLM.text_generation(context,
|
|
|
458 |
max_new_tokens=2048)
|
459 |
title = ec(output, "<|title|>", "<|title|>")[0]
|
460 |
imgp = ec(output)[0]
|
461 |
+
mscp = ec(output, "<|music|>", "<|music|>")[0]
|
462 |
with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
|
463 |
f.write(f"GPT4 Correct Assistant: {output}<|end_of_turn|>")
|
464 |
embed = discord.Embed(title=title,
|
|
|
512 |
file = discord.File("image.png", filename="image.png")
|
513 |
embed.set_image(url="attachment://image.png")
|
514 |
await e.edit(embed=embed, attachments=[file])
|
|
|
515 |
except Exception as exc:
|
516 |
print(exc)
|
517 |
c = client.get_channel(1202160048126840882)
|