seawolf2357 commited on
Commit
1a10faf
·
verified ·
1 Parent(s): 68da81c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -95,8 +95,10 @@ async def start_web_server():
95
  if s.connect_ex(('localhost', port)) != 0:
96
  break
97
  port += 1
98
- subprocess.Popen(["python", "web.py"], env={"GRADIO_SERVER_PORT": str(port)})
 
 
99
 
100
  if __name__ == "__main__":
101
  discord_client = MyClient(intents=intents)
102
- discord_client.run(os.getenv('DISCORD_TOKEN'))
 
95
  if s.connect_ex(('localhost', port)) != 0:
96
  break
97
  port += 1
98
+ # subprocess 통해 web.py 실행 시 python 대신 python3를 명시적으로 사용
99
+ python_executable = 'python3' if os.name == 'posix' else 'python'
100
+ subprocess.Popen([python_executable, "web.py"], env={"GRADIO_SERVER_PORT": str(port)})
101
 
102
  if __name__ == "__main__":
103
  discord_client = MyClient(intents=intents)
104
+ discord_client.run(os.getenv('DISCORD_TOKEN'))