mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 21:45:00 +03:00
bugfix: delete colab
This commit is contained in:
parent
95586403c8
commit
5f41d8100d
@ -185,28 +185,19 @@ if __name__ == '__main__':
|
|||||||
# log_level="warning"
|
# log_level="warning"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# HTTP サーバ起動
|
p = mp.Process(name="p", target=localServer)
|
||||||
if args.colab == True:
|
p.start()
|
||||||
uvicorn.run(
|
try:
|
||||||
f"{os.path.basename(__file__)[:-3]}:app_fastapi",
|
if sys.platform.startswith('win'):
|
||||||
host="0.0.0.0",
|
process = subprocess.Popen([NATIVE_CLIENT_FILE_WIN, "-u", f"http://localhost:{PORT}/{path}"])
|
||||||
port=int(PORT),
|
return_code = process.wait()
|
||||||
log_level="warning"
|
print("client closed.")
|
||||||
)
|
p.terminate()
|
||||||
else:
|
elif sys.platform.startswith('darwin'):
|
||||||
p = mp.Process(name="p", target=localServer)
|
process = subprocess.Popen([NATIVE_CLIENT_FILE_MAC, "-u", f"http://localhost:{PORT}/{path}"])
|
||||||
p.start()
|
return_code = process.wait()
|
||||||
try:
|
print("client closed.")
|
||||||
if sys.platform.startswith('win'):
|
p.terminate()
|
||||||
process = subprocess.Popen([NATIVE_CLIENT_FILE_WIN, "-u", f"http://localhost:{PORT}/{path}"])
|
|
||||||
return_code = process.wait()
|
|
||||||
print("client closed.")
|
|
||||||
p.terminate()
|
|
||||||
elif sys.platform.startswith('darwin'):
|
|
||||||
process = subprocess.Popen([NATIVE_CLIENT_FILE_MAC, "-u", f"http://localhost:{PORT}/{path}"])
|
|
||||||
return_code = process.wait()
|
|
||||||
print("client closed.")
|
|
||||||
p.terminate()
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user