From fead250f55e90d33701657e73b5afa4bec60e7a1 Mon Sep 17 00:00:00 2001 From: Apple Date: Thu, 7 Mar 2024 07:20:53 +0530 Subject: [PATCH] adding comfy python in .env --- .env_sample | 3 ++- __init__.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.env_sample b/.env_sample index 92f93fc..8b0470d 100644 --- a/.env_sample +++ b/.env_sample @@ -1 +1,2 @@ -CLIPDROP_API_KEY= \ No newline at end of file +CLIPDROP_API_KEY= +COMFY_PYTHON_PATH=/home/ubuntu/.conda/envs/comfy/bin/python \ No newline at end of file diff --git a/__init__.py b/__init__.py index 65d5c8a..c3c316b 100644 --- a/__init__.py +++ b/__init__.py @@ -109,8 +109,12 @@ class TRI3DATRParseBatch: # Run the ATR model cwd = os.getcwd() os.chdir(ATR_PATH) + from dotenv import load_dotenv + load_dotenv() + COMFY_PYTHON_PATH = os.getenv('COMFY_PYTHON_PATH','python') + print("python path ", COMFY_PYTHON_PATH) os.system( - "python simple_extractor.py --dataset atr --model-restore checkpoints/atr.pth --input-dir input --output-dir output" + COMFY_PYTHON_PATH + " simple_extractor.py --dataset atr --model-restore checkpoints/atr.pth --input-dir input --output-dir output" ) os.chdir(cwd)