daviddao commited on
Commit
8763ac7
ยท
1 Parent(s): caac0d8

gradio added

Browse files
Files changed (1) hide show
  1. bot.py +13 -2
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
- if __name__ == "__main__":
305
- bot.run('MTA5NzMzMDI2MDI4NDAzNTEyMg.GNFiQP.hZC_2HLTvVAROlKKUmnVQjviT0G4wHeQq23-rs')
 
 
 
 
 
 
 
 
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()