Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,14 +7,9 @@ from threading import Thread
|
|
7 |
|
8 |
|
9 |
load_dotenv()
|
10 |
-
bot = commands.Bot("", intents=discord.Intents(messages=True
|
11 |
|
12 |
|
13 |
-
intents = discord.Intents.default()
|
14 |
-
intents.message_content = True
|
15 |
-
|
16 |
-
client = discord.Client(intents=intents)
|
17 |
-
|
18 |
# model_pipe = pickle.load(open('pipe.pkl', 'rb'))
|
19 |
|
20 |
@bot.event
|
@@ -31,5 +26,8 @@ async def on_message(message: discord.Message):
|
|
31 |
# await message.channel.send(model_pipe.predict([message.content]))
|
32 |
await message.channel.send('Hello from hugging face')
|
33 |
|
34 |
-
|
|
|
|
|
|
|
35 |
t.start()
|
|
|
7 |
|
8 |
|
9 |
load_dotenv()
|
10 |
+
bot = commands.Bot("", intents=discord.Intents(messages=True))
|
11 |
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
# model_pipe = pickle.load(open('pipe.pkl', 'rb'))
|
14 |
|
15 |
@bot.event
|
|
|
26 |
# await message.channel.send(model_pipe.predict([message.content]))
|
27 |
await message.channel.send('Hello from hugging face')
|
28 |
|
29 |
+
bot.env = "prod" # type: ignore
|
30 |
+
bot.name = "Anipins" # type: ignore
|
31 |
+
|
32 |
+
t = Thread(target=bot.run, daemon=True, args=(os.getenv("discord_token"), ))
|
33 |
t.start()
|