seawolf2357 commited on
Commit
3d78f38
ยท
verified ยท
1 Parent(s): ac850a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -51,14 +51,11 @@ async def on_message(message):
51
  timeout=60 # 60 seconds timeout
52
  )
53
 
54
- # ๋กœ๊น…์„ ์ถ”๊ฐ€ํ•˜์—ฌ ๋ฐ˜ํ™˜๊ฐ’ ํ™•์ธ
55
  print(f"Predict result: {result}")
56
 
57
- # ๊ฒฐ๊ณผ๊ฐ€ ํŠœํ”Œ์ด๋ผ๊ณ  ๊ฐ€์ •ํ•˜๊ณ  ์ฒซ ๋ฒˆ์งธ ์š”์†Œ๋งŒ ์‚ฌ์šฉ
58
- if isinstance(result, tuple):
59
- result = result[0]
60
-
61
- await message.channel.send(file=discord.File(result))
62
  except asyncio.TimeoutError:
63
  await message.channel.send("Image generation timed out. Please try again.")
64
  except Exception as e:
 
51
  timeout=60 # 60 seconds timeout
52
  )
53
 
 
54
  print(f"Predict result: {result}")
55
 
56
+ # ํŒŒ์ผ ๊ฒฝ๋กœ๋งŒ ์ถ”์ถœํ•˜์—ฌ ์‚ฌ์šฉ
57
+ file_path = result[0] # ํŠœํ”Œ์˜ ์ฒซ ๋ฒˆ์งธ ์š”์†Œ๊ฐ€ ํŒŒ์ผ ๊ฒฝ๋กœ
58
+ await message.channel.send(file=discord.File(file_path))
 
 
59
  except asyncio.TimeoutError:
60
  await message.channel.send("Image generation timed out. Please try again.")
61
  except Exception as e: