Spaces:
Runtime error
Runtime error
gradio added
Browse files
bot.py
CHANGED
@@ -4,6 +4,10 @@ import redis
|
|
4 |
import os
|
5 |
import random
|
6 |
import time
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Function to generate auto-incremented IDs
|
9 |
def generate_id(key):
|
@@ -301,5 +305,12 @@ async def profile(ctx):
|
|
301 |
embed.set_footer(text=f"๐ Role: {r.get(role).decode()}")
|
302 |
await ctx.respond(embed=embed)
|
303 |
|
304 |
-
|
305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
import os
|
5 |
import random
|
6 |
import time
|
7 |
+
from threading import Thread
|
8 |
+
import gradio as gr
|
9 |
+
from gradio import utils
|
10 |
+
from pathlib import Path
|
11 |
|
12 |
# Function to generate auto-incremented IDs
|
13 |
def generate_id(key):
|
|
|
305 |
embed.set_footer(text=f"๐ Role: {r.get(role).decode()}")
|
306 |
await ctx.respond(embed=embed)
|
307 |
|
308 |
+
t = Thread(target=bot.run, daemon=True, args=('MTA5NzMzMDI2MDI4NDAzNTEyMg.GNFiQP.hZC_2HLTvVAROlKKUmnVQjviT0G4wHeQq23-rs', ))
|
309 |
+
t.start()
|
310 |
+
|
311 |
+
import gradio as gr
|
312 |
+
|
313 |
+
with gr.Blocks() as demo:
|
314 |
+
gr.Markdown(Path('landing.md').read_text())
|
315 |
+
|
316 |
+
demo.launch()
|