osanseviero commited on
Commit
2a77ce8
·
1 Parent(s): 7d2e9bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -3,7 +3,7 @@ import os
3
 
4
  import gradio_client as gr
5
 
6
- from fastapi import FastAPI
7
 
8
  # Get Gradio client
9
  jojogan = gr.Client("akhaliq/JoJoGAN")
@@ -44,15 +44,14 @@ intents = discord.Intents.default()
44
  intents.message_content = True
45
  client = MyClient(intents=intents)
46
 
47
-
48
- app = FastAPI()
49
-
50
  async def run_bot():
51
  client.run(DISCORD_TOKEN)
52
 
53
- # Hacky, keep FastAPI running so Space is running
54
- @app.get("/")
55
- async def root():
56
- return {"message": "Hello World"}
 
 
57
 
58
- asyncio.create_task(run_bot)
 
3
 
4
  import gradio_client as gr
5
 
6
+ import gradio as gr
7
 
8
  # Get Gradio client
9
  jojogan = gr.Client("akhaliq/JoJoGAN")
 
44
  intents.message_content = True
45
  client = MyClient(intents=intents)
46
 
 
 
 
47
  async def run_bot():
48
  client.run(DISCORD_TOKEN)
49
 
50
+ asyncio.create_task(run_bot)
51
+
52
+ def greet(name):
53
+ return "Hello " + name + "!"
54
+
55
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
56
 
57
+ demo.launch()