Spaces:
Runtime error
Runtime error
Commit
·
88b8d6e
1
Parent(s):
a56f949
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,8 @@
|
|
| 1 |
-
import asyncio
|
| 2 |
import discord
|
| 3 |
import gradio_client
|
| 4 |
import gradio as gr
|
| 5 |
import os
|
| 6 |
-
|
| 7 |
|
| 8 |
# Get Gradio client
|
| 9 |
jojogan = gradio_client.Client("akhaliq/JoJoGAN")
|
|
@@ -47,11 +46,10 @@ client = MyClient(intents=intents)
|
|
| 47 |
async def run_bot():
|
| 48 |
client.run(DISCORD_TOKEN)
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
def greet(name):
|
| 53 |
return "Hello " + name + "!"
|
| 54 |
|
| 55 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 56 |
-
|
| 57 |
demo.launch()
|
|
|
|
|
|
|
| 1 |
import discord
|
| 2 |
import gradio_client
|
| 3 |
import gradio as gr
|
| 4 |
import os
|
| 5 |
+
import threading
|
| 6 |
|
| 7 |
# Get Gradio client
|
| 8 |
jojogan = gradio_client.Client("akhaliq/JoJoGAN")
|
|
|
|
| 46 |
async def run_bot():
|
| 47 |
client.run(DISCORD_TOKEN)
|
| 48 |
|
| 49 |
+
threading.Thread(target=run_bot).start()
|
| 50 |
|
| 51 |
def greet(name):
|
| 52 |
return "Hello " + name + "!"
|
| 53 |
|
| 54 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
| 55 |
demo.launch()
|