Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ from scripts.process_utils import initialize, process_image_as_base64, image_to_
|
|
6 |
from scripts.anime import init_model
|
7 |
from scripts.generate_prompt import load_wd14_tagger_model
|
8 |
import webbrowser
|
|
|
9 |
|
10 |
# 初期化
|
11 |
initialize(_use_local=False, use_gpu=True, use_dotenv=True)
|
@@ -13,7 +14,9 @@ init_model(use_local=False)
|
|
13 |
load_wd14_tagger_model()
|
14 |
|
15 |
def process_image(input_image, mode, weight1=None, weight2=None):
|
16 |
-
|
|
|
|
|
17 |
# 既存の画像処理ロジック
|
18 |
if mode == "original":
|
19 |
sotai_image, sketch_image = process_image_as_base64(input_image, mode, None, None)
|
|
|
6 |
from scripts.anime import init_model
|
7 |
from scripts.generate_prompt import load_wd14_tagger_model
|
8 |
import webbrowser
|
9 |
+
from datetime import datetime
|
10 |
|
11 |
# 初期化
|
12 |
initialize(_use_local=False, use_gpu=True, use_dotenv=True)
|
|
|
14 |
load_wd14_tagger_model()
|
15 |
|
16 |
def process_image(input_image, mode, weight1=None, weight2=None):
|
17 |
+
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S") # 現在のタイムスタンプを取得
|
18 |
+
print(f"[{current_time}] Processing image with mode={mode}, weight1={weight1}, weight2={weight2}")
|
19 |
+
|
20 |
# 既存の画像処理ロジック
|
21 |
if mode == "original":
|
22 |
sotai_image, sketch_image = process_image_as_base64(input_image, mode, None, None)
|