Araeynn commited on
Commit
d7dbe33
1 Parent(s): 6e83377

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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://img.wattpad.com/23622f36a9f2e16021a90dd6c8f06f349b060aa5/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f776174747061642d6d656469612d736572766963652f53746f7279496d6167652f31745f64577071665f66374266773d3d2d3530373838323233362e313565663962326633663437396366323732383931343132313234372e676966"
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)