seawolf2357 commited on
Commit
b1244a4
Β·
verified Β·
1 Parent(s): 6b0f0a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -52,8 +52,8 @@ class MyClient(discord.Client):
52
 
53
  async def generate_image(prompt):
54
  try:
55
- # μž…λ ₯에 λŒ€ν•œ λͺ¨λΈ 호좜
56
- response = hf_client.post(inputs={"inputs": prompt})
57
  image_data = response['images'][0] # μ‘λ‹΅μ—μ„œ 이미지 데이터 μΆ”μΆœ
58
  image_bytes = io.BytesIO(base64.b64decode(image_data))
59
  image = Image.open(image_bytes)
@@ -65,6 +65,7 @@ async def generate_image(prompt):
65
  return None
66
 
67
 
 
68
  async def send_image(channel, image_path):
69
  file = discord.File(image_path)
70
  await channel.send(file=file)
 
52
 
53
  async def generate_image(prompt):
54
  try:
55
+ # λͺ¨λΈ 호좜
56
+ response = hf_client(inputs=prompt)
57
  image_data = response['images'][0] # μ‘λ‹΅μ—μ„œ 이미지 데이터 μΆ”μΆœ
58
  image_bytes = io.BytesIO(base64.b64decode(image_data))
59
  image = Image.open(image_bytes)
 
65
  return None
66
 
67
 
68
+
69
  async def send_image(channel, image_path):
70
  file = discord.File(image_path)
71
  await channel.send(file=file)