Radosław Wolnik commited on
Commit
dd959b4
·
1 Parent(s): a2a75a4
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -42,8 +42,8 @@ async def on_message(message):
42
  message_counts[message.channel.id] = 0 # Reset the counter
43
 
44
 
45
- response = ai.text_generation(str(message), temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0)
46
- splited_response = split_string(response)
47
  for part in splited_response:
48
  await channel.send(part)
49
 
@@ -51,7 +51,6 @@ async def on_message(message):
51
 
52
  def split_string(text: str) -> list[str]:
53
  """Helper function to split text into chunks"""
54
-
55
  return [text[i:i+3900] for i in range(0, len(text), 3900)]
56
 
57
  def generate(
 
42
  message_counts[message.channel.id] = 0 # Reset the counter
43
 
44
 
45
+ response = generate(str(message), temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0)
46
+ splited_response = split_string(str(response))
47
  for part in splited_response:
48
  await channel.send(part)
49
 
 
51
 
52
  def split_string(text: str) -> list[str]:
53
  """Helper function to split text into chunks"""
 
54
  return [text[i:i+3900] for i in range(0, len(text), 3900)]
55
 
56
  def generate(