Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ from discord.ext import commands
|
|
14 |
from discord.utils import oauth_url
|
15 |
from gradio_client.utils import QueueError
|
16 |
import base64
|
|
|
17 |
|
18 |
event = Event()
|
19 |
|
@@ -71,7 +72,7 @@ async def ai(ctx, *, input_text: str):
|
|
71 |
await ctx.reply(result)
|
72 |
|
73 |
def query(payload):
|
74 |
-
response = requests.post(
|
75 |
return response.content
|
76 |
|
77 |
@bot.command()
|
|
|
14 |
from discord.utils import oauth_url
|
15 |
from gradio_client.utils import QueueError
|
16 |
import base64
|
17 |
+
import io
|
18 |
|
19 |
event = Event()
|
20 |
|
|
|
72 |
await ctx.reply(result)
|
73 |
|
74 |
def query(payload):
|
75 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
76 |
return response.content
|
77 |
|
78 |
@bot.command()
|