From a8d54768c6ce293393a300cff86e74dda3eb3f2c Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Sat, 28 Dec 2024 15:42:59 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]=20Rename/Remove?= =?UTF-8?q?=20:=20`webui=5F`=E3=82=92=E5=89=8A=E9=99=A4/test.py=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend.spec | 2 +- backend_cuda.spec | 2 +- .../{webui_controller.py => controller.py} | 0 src-python/{webui_mainloop.py => mainloop.py} | 2 +- src-python/test.py | 40 ------------------- 5 files changed, 3 insertions(+), 43 deletions(-) rename src-python/{webui_controller.py => controller.py} (100%) rename src-python/{webui_mainloop.py => mainloop.py} (99%) delete mode 100644 src-python/test.py diff --git a/backend.spec b/backend.spec index b1955222..33ec3cae 100644 --- a/backend.spec +++ b/backend.spec @@ -2,7 +2,7 @@ a = Analysis( - ['src-python\\webui_mainloop.py'], + ['src-python\\mainloop.py'], pathex=[], binaries=[], datas=[('./fonts', 'fonts/'), ('.venv/Lib/site-packages/zeroconf', 'zeroconf/'), ('.venv/Lib/site-packages/openvr', 'openvr/'), ('.venv/Lib/site-packages/pykakasi', 'pykakasi/'), ('.venv/Lib/site-packages/faster_whisper', 'faster_whisper/')], diff --git a/backend_cuda.spec b/backend_cuda.spec index d0bb0348..34ed248f 100644 --- a/backend_cuda.spec +++ b/backend_cuda.spec @@ -2,7 +2,7 @@ a = Analysis( - ['src-python\\webui_mainloop.py'], + ['src-python\\mainloop.py'], pathex=[], binaries=[], datas=[('./fonts', 'fonts/'), ('.venv_cuda/Lib/site-packages/zeroconf', 'zeroconf/'), ('.venv_cuda/Lib/site-packages/openvr', 'openvr/'), ('.venv_cuda/Lib/site-packages/pykakasi', 'pykakasi/'), ('.venv_cuda/Lib/site-packages/faster_whisper', 'faster_whisper/')], diff --git a/src-python/webui_controller.py b/src-python/controller.py similarity index 100% rename from src-python/webui_controller.py rename to src-python/controller.py diff --git a/src-python/webui_mainloop.py b/src-python/mainloop.py similarity index 99% rename from src-python/webui_mainloop.py rename to src-python/mainloop.py index 72cdd88e..c17c9564 100644 --- a/src-python/webui_mainloop.py +++ b/src-python/mainloop.py @@ -4,7 +4,7 @@ import time from typing import Any from threading import Thread from queue import Queue -from webui_controller import Controller +from controller import Controller from utils import printLog, printResponse, errorLogging, encodeBase64 controller = Controller() diff --git a/src-python/test.py b/src-python/test.py deleted file mode 100644 index 9276f4e4..00000000 --- a/src-python/test.py +++ /dev/null @@ -1,40 +0,0 @@ -import sys -import json -import time - -def main(): - received_data = sys.stdin.readline().strip() - received_data = json.loads(received_data) - - with open('process.log', 'a') as f: - f.write(f"received_data: {received_data}\n") - - if received_data: - response_data = { - "status": "ok", - "id": received_data["id"], - "data": received_data["data"], - } - response = json.dumps(response_data) - time.sleep(2) - print(response, flush=True) - - - # with open('process.log', 'a') as f: - # f.write(f"Received data: {received_data}\n") - # f.write(f"Response: {response}\n") - - # # 標準出力に結果を出力 - # for i in range(10): - # print(str(i), flush=True) - # time.sleep(1) - -if __name__ == "__main__": - try: - print(json.dumps({"init_key_from_py": "Initialization from Python."}), flush=True) - while True: - main() - except Exception: - import traceback - with open('error.log', 'a') as f: - traceback.print_exc(file=f) \ No newline at end of file