govisi commited on
Commit
4f5bd17
1 Parent(s): 6b6a9ec

few tweaks

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -20,11 +20,13 @@ dtype = torch.bfloat16 # torch.float32, torch.float64, torch.bfloat16
20
 
21
  useGPU = False # False
22
 
23
- model = RWKV("RWKV-4-Pile-3B-Instruct-test2-20230209.pth", mode=TORCH, useGPU=useGPU, runtimedtype=runtimedtype, dtype=dtype)
24
 
25
  @bot.event
26
  async def on_ready():
27
  print(f'We have logged in as {bot.user}')
 
 
 
28
 
29
  @bot.listen('on_message')
30
  async def on_message_event(message):
@@ -51,10 +53,10 @@ async def on_message_event(message):
51
  await asyncio.sleep(1)
52
  await mess.edit(content=tex)
53
 
54
- if message.content:
55
- print(message.content)
56
- # await message.channel.send(model_pipe.predict([message.content]))
57
- await message.channel.send('Hello from hugging face')
58
  # await bot.process_commands(message)
59
 
60
  bot.env = "prod" # type: ignore
 
20
 
21
  useGPU = False # False
22
 
 
23
 
24
  @bot.event
25
  async def on_ready():
26
  print(f'We have logged in as {bot.user}')
27
+ global model
28
+ model = RWKV("RWKV-4-Pile-3B-Instruct-test2-20230209.pth", mode=TORCH, useGPU=useGPU, runtimedtype=runtimedtype, dtype=dtype)
29
+
30
 
31
  @bot.listen('on_message')
32
  async def on_message_event(message):
 
53
  await asyncio.sleep(1)
54
  await mess.edit(content=tex)
55
 
56
+ # if message.content:
57
+ # print(message.content)
58
+ # # await message.channel.send(model_pipe.predict([message.content]))
59
+ # await message.channel.send('Hello from hugging face')
60
  # await bot.process_commands(message)
61
 
62
  bot.env = "prod" # type: ignore