Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
no_server: skip unused imports
Browse files- resources/app/no_server.py +11 -11
resources/app/no_server.py
CHANGED
@@ -28,9 +28,9 @@ try:
|
|
28 |
import logging
|
29 |
from logging.handlers import RotatingFileHandler
|
30 |
import json
|
31 |
-
from socketserver import ThreadingMixIn
|
32 |
-
from python.audio_post import run_audio_post, prepare_input_audio, mp_ffmpeg_output, normalize_audio, start_microphone_recording, move_recorded_file
|
33 |
-
import ffmpeg
|
34 |
except:
|
35 |
print(traceback.format_exc())
|
36 |
with open("./DEBUG_err_imports.txt", "w+") as f:
|
@@ -100,14 +100,14 @@ if CPU_ONLY:
|
|
100 |
torch_dml_device = torch.device("cpu")
|
101 |
|
102 |
|
103 |
-
try:
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
except:
|
109 |
-
|
110 |
-
|
111 |
|
112 |
plugin_manager.run_plugins(plist=plugin_manager.plugins["start"]["pre"], event="pre start", data=None)
|
113 |
|
|
|
28 |
import logging
|
29 |
from logging.handlers import RotatingFileHandler
|
30 |
import json
|
31 |
+
# from socketserver import ThreadingMixIn
|
32 |
+
# from python.audio_post import run_audio_post, prepare_input_audio, mp_ffmpeg_output, normalize_audio, start_microphone_recording, move_recorded_file
|
33 |
+
# import ffmpeg
|
34 |
except:
|
35 |
print(traceback.format_exc())
|
36 |
with open("./DEBUG_err_imports.txt", "w+") as f:
|
|
|
100 |
torch_dml_device = torch.device("cpu")
|
101 |
|
102 |
|
103 |
+
# try:
|
104 |
+
from python.plugins_manager import PluginManager
|
105 |
+
plugin_manager = PluginManager(APP_VERSION, PROD, CPU_ONLY, logger)
|
106 |
+
active_plugins = plugin_manager.get_active_plugins_count()
|
107 |
+
logger.info(f'Plugin manager loaded. {active_plugins} active plugins.')
|
108 |
+
# except:
|
109 |
+
# logger.info("Plugin manager FAILED.")
|
110 |
+
# logger.info(traceback.format_exc())
|
111 |
|
112 |
plugin_manager.run_plugins(plist=plugin_manager.plugins["start"]["pre"], event="pre start", data=None)
|
113 |
|