add setup for defer in sloppy.py

This commit is contained in:
2026-05-13 08:08:10 -04:00
parent a659089eb7
commit 900e8d5400
+7 -2
View File
@@ -1,16 +1,21 @@
import sys
import os
# Add project root to sys.path
project_root = os.path.dirname(os.path.abspath(__file__))
if project_root not in sys.path:
sys.path.insert(0, project_root)
# Suppress Hugging Face Hub warnings and progress bars
thirdparty = os.path.join(project_root, "thirdparty")
if thirdparty not in sys.path:
sys.path.insert(0, thirdparty)
os.environ["HF_HUB_DISABLE_SYMLINKS_WARNING"] = "1"
os.environ["HF_HUB_DISABLE_PROGRESS_BARS"] = "1"
os.environ["TOKENIZERS_PARALLELISM"] = "false"
from defer.sugar import install as _install_defer
_install_defer()
from src.gui_2 import main
if __name__ == "__main__":